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

Legumes are plants that produce _____.
Dina spent 6 dollars on a sandwich. Then she spent 3 dollars on a drink. Addition expression: ______________________________ Subtraction expression: ___________
What is the binary code for 101?
what is the correct precision??
4t+5su+7st how many terms are in this expression ?
Thinking about the definitions of Revolutionary discussed earlier, do you think the Magna Carta played a role in the thinking of our founding fathers? If so, ho
Sort each characteristic according to whether it describes the parent absolute function, graph opens up Describes f(x) = 1x/ Does Not Describe f(x) = 1x| range:
please help im stressing :(((( (what is Danielle mistake in this problem )
Find the product using the number line. 3(-6) = A number line going from negative 7 to positive 3. An arrow goes from negative 6 to negative 4, from negative 4
What were three things the Puritans accomplished in the first 20 years of them being in America?