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

How to build democracy?​
Harry has 0.5 of a bottle of water in his gym bag. The bottle holds 0.9 liter of water. How many liters of water does Harry have?
The passage primarily suggests that:_______. (A) although the speaker loves the river, he must leave it in order to challenge himself (B) as the speaker becom
Pls help ASAP. Mai solved the equation below incorrectly. Identify Mai's error then solve the equation correctly.
An elephant kicks a 2.5 kg rock that is initially at rest. The net force on the rock varies with time as shown below. What is the rock's change in momentum betw
find the percentage increase of a rectangle ​
Solve the system using substitution. 2x - 5y = 26 X - 5y = 3
A frog can hop a maximum speed of about 60 feet every 4 seconds. How far can he hop in 30 seconds
any of the ancwers please someone help :) ​
10. Find the rate of change in the table below. Show all work. х 18 20 22 24 y 4.5 5 5.5 6