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

to whom was the squire related
Is open office compatible will all web browsers without requiring a plug in?
How do political parties help to unify the american people?
Image courtesy of NASA The image above shows an __________, a narrow strip of land that connects two larger landmasses. A. isthmus B. island C. estuary D. ato
What kind of number cannot be written as a quotient of two integers?
I need this answered by today 9-3-18
What is the largest perfect square less than 225 that is a multiple of 9?
Factor 2a^2 - 16a + 32
A retired woman has $70,000 to invest but needs to make $9,000 a year from the interest to meet certain living expenses. One bond investment pays 15% annual int
Mr. Wilson has $3,000 in his bank account. Ms. Nelson has 10 times as much money in her bank account as Mr. Wilson has in his bank account. How much money does