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

i need to write a fake news article about whatever, usually in my free writing school projects i use a lot of imagination but i cant think of anything this is o
two principal approaches governing the study of animal behavior​
How's life? .............................................................
Help me with this EdPuzzle pls.
Can someone pls help me?
Martin spent $2.60 on his lunch. Sandwiches cost $1.25. Milkshakes cost $0.65. How much MORE does a sandwich cost than a milkshake?
You want to examine the possibility of using a polymeric material as an artificial load bearing surface for articulating joints. But, the deformation of this ma
What is the slope of the line?
The Cousins by Karen M. McManus......Matt Ryan became Andrew sworn enemy because he had?? A used Allison to get a job at Catmint House B succeeded at being acce
Why does a floating leaf indicate that photosynthesis is occurring?