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

What is Kant's purpose in writing "What is Enlightenment?"
True or false The value 3pi/2 is a solution for the equation 2sin^2x -sin x -1=0
which of the following best describes the english expression the product of two and a number minus eleven? A. 2x-11 B. 2(11-x) C. 2 ------ x-11 D. 2 -11 --
without dividing or listing multiples, how can you tell if 61 is a multiple of 6?
Literature help !!! Only answer if you read THE LoTERY
Which expression is equivalent to
Please help! 15 points! This is one characteristic of abstract expressionist painting A. realism B. cubism C. dynamic expression D. objective
what economic problems led to nigerias adoption of military rule in the 1980s
Which of the following statements are true of the graph of the function f(x)= (x+5)(x-3). Select all that apply. A) the graph has a relative maximum B) the grap
1.6 times y equals 9 Solve for y