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
dolphi86 [110]
3 years ago
8

I need help with Python. The first image is the code and the 2nd is the output.

Computers and Technology
1 answer:
Gekata [30.6K]3 years ago
4 0
The issue arises because the string you are trying to print is not a string, rather a float value. Item1, item2 and item3 are strong values (if you type some alphabets in it and not just numbers), but itemonecost, itemtwocost, and itemthreecost are explicitly type casted to float. In line 22, 23, and 24 you’re trying to print a float, by adding it with the string. One cannot add numbers to string. Rather you can type cast the itemcost to string while printing.

Add str(itemonecost) instead of itemonecost in print statement. Do this for other float variables too.

However do note that there are multiple ways to correct this issue, and I’ve just pointed one out.
You might be interested in
Which website allows you to host your podcast for at a cost that includes your domain name?
scZoUnD [109]

Answer: WordPress

Explanation:It is a kind of website where you can publish your content on any thing and can also buy domain there,if wanted

8 0
3 years ago
Read 2 more answers
What is the standard internet protocol, which provides the technical foundation for the public internet?
luda_lava [24]
You have to be carefull no bulling cuiberbulling people hurt there self for stuff like that
3 0
3 years ago
Why will the standard replacement algorithms (LRU, FIFO, clock) not be effective in handling this workload for a page allocation
dusya [7]

Answer:

These algorithm keeps an eye on which page was used when. LRU assumes that the page that was recently used has more probability  

of being used or requested by the user. Thus, it keeps the pages that were recently used, when a new page is requested. If page  

fault occurs, the requested page is fetched and it replaces the page in cache which was last referenced earlier than any other page  

in the cache (or frame).The LRU associates a time with each page in the memory and the ones with the greatest value are replaced.  

It does not suffer from Belady’s anomaly. The page fault will be referred when 512 page frame are reached. This is the total length of the complete sequence.

FIFO replaces pages that come in cache firstly. FIFO stands for First in first out.  

(b) The FIFO replacement algorithm replaces the page which was first brought into the memory followed by the next and soon.  

This algorithm suffers from Belady’s anomaly. In First In First out (FIFO) page replacement scheme of page replacement, the requests  

are executed as they are received. When a new request is made of a page which is not available in the existing frames, then the requested  

page is acquired from the memory. The page in the first frame is replaced by the requested page. If again a request is made of a page not  

yet available in the frames, it is fetched from the memory and it replaces the second frame's page, and so on.  

There are total 500 frames given. The alternative approach which is better than clock algorithm, FIFO, and LRU is that the pages  

from 0 to 498 are set to the fixed frames. Thus, 499 frames are fixed and only one frame can vary.

Explanation:

6 0
3 years ago
Is ubisoft still making assassins creeds on xbox 360
BabaBlast [244]
I don’t think so. Not sure though
8 0
3 years ago
Read 2 more answers
Which of the following can a cell contain?
Ksju [112]
The answer is choice D-All of these :)
8 0
3 years ago
Read 2 more answers
Other questions:
  • Are there protections for people in terms of what data can be collected by different sites?
    10·1 answer
  • Suppose that you created an robot that was so advanced it could act independently in very complex situations. It made its own de
    9·1 answer
  • What does computer means?
    13·2 answers
  • Write a C program that includes a function of type double called divemaster accepts two double arguments (you must write the div
    15·1 answer
  • Como podemos calcular a média dos valores da Tabela acima no Excel? Assinale a alternativa correta
    11·1 answer
  • James has a USB flash drive that he has used at work. The drive needs to be thrown away, but James wants to make sure that the d
    12·1 answer
  • Which of the following file formats cannot be imported using Get & Transform?
    6·1 answer
  • Display the Approval Form worksheet and create an IF statement in cell B13 to determine if the applicant is eligible for a perso
    7·1 answer
  • Give an example of what Artificial Intelligence application most popular is used on a daily basis.
    12·2 answers
  • One of the most notable impacts of IT on business is improved
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!