1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
navik [9.2K]
3 years ago
15

Input a string of digits. Convert the string to an int. Print the int. Convert the string to a float. Print the float.

Computers and Technology
1 answer:
ollegr [7]3 years ago
7 0

Answer:

x_inp = [ '1', '2', '3']

   int_val = [ int(a) for a in x_inp ]

   print("integer: int_val")

y_inp = [ '1.0', '2.0', '3.0']

flo_val = [ float(a) for a in y_inp ]

   print("float: flo_val")

Explanation:

All the items in the arrays x_inp and y_inp are coverted to integer and float data types respectively with the for loop statement, which individually assigns the resolved integer and float values to the memory locations int_val and flo_val respectively.

The output becomes,

integer:

1

2

3

float:

1.0  

2.0

3.0

You might be interested in
Which tool will be useful in darkening a subject’s hair color in a photograph? A.Dodge tool B.Burn tool C.Patch tool D.Blur tool
choli [55]
It's B. The burn tool darkens stuff. The dodge tool lightens stuff. hope this helps, have an amazing day :)
8 0
4 years ago
Read 2 more answers
State the steps for opening Ms word Application ​
Charra [1.4K]

Answer:

Step 1: From the desktop or from your 'Start' menu, open Microsoft Word. Step 2: Click either File or the Office button at the top left. Select Open and browse to the document you wish to open. Double-click on it with your left-hand mouse button to open it.

Explanation:

PLZ MARK AS THE BRAINLIEST

HAVE A GOOD DAY

: )

4 0
3 years ago
Buying a house is most likely a long-term goal for a person of which of these
vekshin1

Answer:

B  i think

Explanation:

5 0
4 years ago
Which key retains its uniqueness even after you remove some of the fields?
Natasha_Volkova [10]

Answer:

Primary key retains its uniqueness even after you remove some of the fields.

Explanation:

I am assuming that this question is related to database. Therefore, I am answering it according to database context.

In database, you can have multiple rows and columns. Each column shows a specific attribute while each row plots the data according to the attributes. However, there is the first column of each of main table that has unique set of values. It is called the Primary Key. Some key features of primary key are:

  • It always contains the unique value.
  • Its value cannot be null.
  • A table can have at max one primary key.
  • It can be the combination of multiple columns but it must be unique.

Therefore, the primary key has the ability to retain its uniqueness even after you remove some of the fields.

8 0
4 years ago
Assume a disk cache hit rate (dchr) of 95% and 2 millisecond on average to access a page in cache. If the average access time to
MrRa [10]

Answer:

The answer is provided in the form of explanation

Explanation:

A page fault occurs means that the required page is not in main memory. First OS check for

page in the cache memory, if the page is present then retrieved but if not present then check for

page in main memory and if the page is not present here too then it searches for page in hard

drive. To calculate the expected time, the following formula is used:

Cache hit ratio = 95% = 0.95

Cache miss ratio = 5% = 0.05

Cache access time = 2 millisecond

The average access time of hard drive = 30 milliseconds

Expected time = Hit ratio (cache access time +memory access time) + Miss ratio (cache

access time + 2 * memory access time)

= 0.95 (2+30) + 0.05 (2+2*30)

= 0.95 (32) + 0.05(62)

=30.4 + 3.1

= 33.5 millisecond

Expected time = cache hit ratio * cache access time + (1 – hit ratio) * cache miss ratio

= 0.95*2+(1-0.95)*0.05

= 1.9025

4 0
3 years ago
Other questions:
  • When working with a table, combining two or more cells into one is known as _____.
    12·1 answer
  • What is the purpose of network permissions?
    11·2 answers
  • Describe how you could obtain a statistical profile of the amount of time spent by a program executing different sections of its
    10·1 answer
  • Which practice is the best option for desktop security? A. Make a unique user ID and password for each account. B. Change the pa
    9·2 answers
  • Which type of memory helps in reading as well as writing data? With the help of , a computer can read as well as write or modify
    11·3 answers
  • What is the best way to show a complex data chart in word?
    6·1 answer
  • Explain the uses of computer in police department​
    13·2 answers
  • An engine that generates hot, expanding gases by burning fuel inside the machine.
    9·1 answer
  • Does anyone know how to permanently delete photos on a dell computer? For my cousin.
    12·1 answer
  • See attached. I have code typed out but still having problems.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!