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

Hello, you can answer my questions please..
Need help explain how to show work to
how many chromosomes pairs are found in human cell
PLS ASAP Why does a coastal area have less variation in temperature than a noncoastal area? Tempe
A function, f(x), represents the distance, in miles, that sarah drives each hour, x. Select the appropriate domain for this situation. A. The set of all positiv
what's the leading cause of air pollution?
help plz need answer 20 pts!!!!!!!!!!!!Complete the sentence. The lower the hydrogen ion concentration, the ______ the pH. higher lower closer to 7 closer to 02
I’m The Canterbury Tales, the pilgrim guide requests each pilgrim to tell _____ stories A. One B. Two C. Three D. Four
how to differentiate?
What did Upton Sinclair do to prepare for writing The Jungle? Select all that apply. A He studied details about working in a slaughterhouse. B He studied deta