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

A farmer builds a fence for his chickens in the shape of a pentagon, as shown. Each of the 5 sides has equal length, but the fence along the highway costs twice
Which statement rejects the idea that raising cattle is bad for the environment? A. Some estimates show that the amount of water used just for farming equals
Q Use the drop-down menus to identify which vocabulary terms match the definitions. 1) (Short-term/ long-term ) goals are goals that a person means to accomplis
120 Paul has $3.69. His sister gives him another $5.25, and he goes out and buys a CD single for $3.99. How much does he have left?
¿Por qué el sol sale por el este y se pone por el oeste?​
The compound XCl4 contains 75.0% Cl by mass. What is the element X? nch of the following
state Newton's laws of motion​
If you want to present slides to fellow students or co-workers, which productivity software should you use to create them?
D =m/v solve for m (it said it had to be at least 20 characters so… ur mom)
dsds sd as dasd as dsad sa sad sad as dsad sdasdasdawdwada.