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 2 sources does the earth get its energy from
What is the main message of the passage issued by the ussr's ministry of foreign affairs? the middle east should fear the united states and great britain, not t
One of the byproducts of nuclear power generation is Uranium-233. Uranium is decaying at a constant 32% rate per day. If 12,880 pounds are produced from a power
you're on a residential construction team doing Roofing. the pitch of a roof is 1 / 3 rise over run. Find the rise if the horizontal run of the roof is 15 ft 3/
Why is my 2002 dodge caravan 3.3 liter disabling my electric components?
What is the slope of the line that contains the points (-1,8) and (5,-4)?
Research what is something times something equals 43
Which is an example of a nonverbal illustrator? the professor hits the desk to emphasize each main point. the students start packing up their books to let the p
Why does the capital of Columbia, Bogota DC, and the capital of US, Washington DC, both have "DC"?
ANSWER PLZ QUICK AND FAST