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

Why must cartographers change the shapes of places on maps?
9+10=A.) 19B.) 12C.) 10D.) 21​
what are the point on natural resources​
Which of the following is irrational? 6 25 0.16 900
"Between a pilot and a priest, who do you think should fly a commercial jet airplane? Who should perform a marriage?"
A teacher is preparing the materials list for an activity that all 6th graders will complete. Each student will create a scale model of the planets in Earth's s
Which number line shows the solution to −6 − (−2)?
Which specialized carbohydrate is used in shrimp exoskeletons? O cellulose O glucagon O glycogen chitin
What is the dependent variable based on the data shown? A) acres of corn B) type of fertilizer C) amount of fertilizer D) bushels of corn produced
I need help on these two please!