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

Help me w the periodic table please I don’t know what atomic number is for the last three!
2 of the 36 students in Ian's grade have a pet. What is the ratio of the number of students who do not have a pet to the total number of students? Write your an
Can someone help me with this please
A scale drawing of a building needs to be made using the scale 1 in = 200 ft. How tall will the building in the scale drawing be if the building is 1200 ft tall
why does the moon orbit the earth
Today's post is all about They are shy. They're good at understanding people's feelings, so their friends love them very much. They can be extremely lazy when t
A rescue plane travels horizontally at 30.0m/s 200.0m above the ground. it drops a supply package.
What is the slope and y-intercept of this graph?
what is the smaller fraction 1/8 or 3/7 or 2/5
During World War II, which were Allied nations? France and Switzerland Germany and Italy Great Britain and the Soviet Union Great Britain and Switzerland.