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 particle moves through an xyz coordinate system while a force acts on it. When the particle has the position vector r with arrow = (2.00 m)i hat − (3.00 m)j +
Ben, Tim, and Sam have to do a certain job. Ben can finish the job in 5 hours. Tim can finish the job in 6 hours. Sam can finish the job in x hours. The three o
what did Henry the 8th do?​
If you substitute the x- and y-values of the point for x and y in the equations, will both equations be true?
3/4x - 7/12 + 7/24x + 2/3 - 1/6x simplify
If cos x = sin(20 + x) ° and 0°
m - 7 < 6 A. m< -1 B. m>1 C. m<13 D. m<-13
People leaving an ice cream store were asked to name their favorite flavor of ice cream. Fifty-one people said chocolate was their favorite flavor. If 68% of th
One way that historical political parties consolidated power was through appointing faithful party members to government jobs, also known as ____________.A. The
Phase II drug degradation reactions involves linking of conjugates to the drugs are ___ A) Glutathione B) Glycine C) Both (a) & (b) D) None of these