kittycarmona04 kittycarmona04
  • 03-11-2020
  • Computers and Technology
contestada

Assume: itemCost = input(“Enter cost of item: “) Write one line of code that calculates the cost of 15 items and stores the result in the variable totalCost

Respuesta :

Cytokine
Cytokine Cytokine
  • 03-11-2020

itemCost = input("Enter cost of items: ")

totalCost = 15 * float(itemCost)

print(totalCost)

The first line gets the total cost of the item from the user. The second line calculates the cost of 15 of those items and stores that value in the variable totalCost. The last line is just to test that our calculation works. I hope this helps!

Answer Link

Otras preguntas

How much will 25 pounds of bananas cost of each pins is .59 cents
what might a tyrant say to a citizen who are asking for democracy
4% of what number is 11
What is 16% of 32 million
The layout button is located in the ____ group on the home tab?
What was the greatest challenge cities faced as a result of rapid industrialization in the 1800s?
If it takes a man a week to walk a fortnight, and bacon is ten pence a loaf. How much cloth to make a humpty backed giraffe a waist coat
What is the basic function of catabolic operons like the lac operon?
Of these four words, which one is most likely to have a negative flavor? A. Distract B. Harangue C. Meander D. Confound
It rained 0.45 inch on Friday, 2.2 inches on Saturday, and 1.02 inches on Sunday. How much more did it rain on Saturday than on Friday and Sunday combined?