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 4/9 - 2/15 in simplest form
In the book number of stars how did Annemarie show kindness to her younger sister?
this is the problem:Brooke has to set up 70 chairs in equal rows for the class talent show.But ,there is not room for more than 20 rows.What are the possible nu
How do you change Newtons into kilograms
The telephone was an innovation of A. Guglielmo Marconi B. Thomas Edison C. Alexander Graham Bell D. Jean Lenoir E. Gustav Eiffel
In the Declaration of Independence, Thomas Jefferson listed a series of grievances that colonists had against British rule. What purpose did this serve? The lis
three times a number is 42. What is the number?
Order the ratios from least to greatest: 7:2, 12:4, 20:6, 21:14, 10:5
Which words in the sentence make up the infinitive phrase? On our way to the store, can we plan to stop by the farmer's market? A. to stop by the farmer's mar
What is a sentence with the word Disheveled?