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

Can you tell me if these are right or if these two are right?
One way the government promoted assimilation in the 1800's was to forbid American Indian children a from speaking their languages b from adopting a new way of
look at (c), is it accurate? ​
Assessment Use "The Legend of Elephant and Monkey" to answer questions 1-4 1 What does the third person point of view help the reader understand? A The events
why do reactions go faster at a higher temperature?
A logo is in the shape of a circle. The radius of the logo is 4cm.What is the area of the logo?
Please answer FAST!!!! Now that you've learned about the various principles of training, it's time to put them into action. You are going to pick an activity th
Describe three reasons for the prevalence of sedentary lifestyles.
Factor: x^2 - 4x - 21
Help me !!! What is the velocity of a ball with a momentum of -4.5 kg*m/s and a mass of 0.45 kg?