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

British citizens in China were granted ____, or the right to live under their own laws.
Jenna bought 5 pounds of apples for $6.85. What is the unit price per pound of apples?
What is the sine ratio for ∠F?
Round 1,129.872 To The Nearest Tenth
A recipe for chicken soup calls for 4 cups of water fir 9 servings. How many servings can be made with 12 pints of water?
What famous statement proved that Herbert Hoover believed the economy would quickly recover from the Great Depression? a. “prosperity is just around the corner
People living in and around the Amazon rain forest have used parts of the gaviola tree to prepare medicines. Research is being conducted to determine if this tr
The czar responded to the Revolution of 1905 by __________.
Which type of chemical bond is formed between two atoms of bromine? (1) metallic (3) ionic(2) hydrogen (4) covalent
what are van der waal forces in detail?