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

Which university was the scene of a tragic anti-war demonstration on May 4, 1970?
Charlie’s Car Rentals charges a flat fee of $20 plus $24/day to rent a car. Jerry’s Car Rentals charges $28/day with no flat fee. The system that models this si
In England people associate the acceptance of their bill of rights with the reign of
Mr Atkinson has 5 1/4 lb of dry fish food. He will put an equal amount of food into 3 containers. How much fish food will be in each container.
Why doesn''t the patellar reflex happen when your leg is straight? How does the patellar reflex happen when your leg is straight? Does the patellar reflex prote
a similarity between humans and many other multicellular animals is that they
what was a main goal of education for students in the New England colonies ?
Which organelles aid in locomotion?
Marco has a collection of 38 state quarters. If 3/5 of his quarters are dated 2005, what is the approximate value of the quarters from 2005?
Which country created eggnog?