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

A town experiences a smaller earthquake several days after a large one. What has occurred?
What does CPU stand for. And it is the _____ of the computer
what materials where used to make the first gps
what is 2,852.1 rounded to the nearest tenths
Do all parallelograms have diagonals that are lines of symmetry?
how many number of strands are in DNA?
a snowbarder decends a 12000-ft hill in 3min. hat is the mean change in evlevation per min.
A decimal number has 2 digits to the right of it's decimal point. If we round it to the nearest tenth, the result is 18.6. What is the maximum possible value of
what events led to a conflict between the Jamestown settlers and the powhatan confenderacy
Twelve friends came to Guy’s birthday party. He received seven gifts and a total of $95 in cash for his birthday. He buys an airplane model kit for $9, and he w