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 describes an extremely dry climate? 1=arid 2=downdraft 3=condensation
Which of the following is slang? awesome lab selfie aren’t
Whats another name for hawaiian islands?
Why was capitalism viewed as an unfair system in the 19th century?
If an applicant is experienced, has a solid work history, and is staying within her field, the most effective format for her resumé would likely be _____. chron
Which demographic group is correctly matched with its issue? Question 7 options: a. religious people - environmental legislation b. Midwesterners - farm subsid
How do you know the number of part to divide a number line from 0 to 1 into when comparing fractions
Which of the following was used to regulate society in classical India? A. legalism B. Confucianism C. the caste system D. Taoism
An increase in hours of television viewing leads to increases in the sales of snack foods. This is an example of a _____.
Hero who cut off Medusa's head.