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

which can be used to determine the sex of a victim from dental remains
Prewar conflicts in Europe concerned all of the following except: control of the Balkan states, Alsace-Lorraine, North African colonies, Italians under Austrian
what is tje answer 3m - m
Simplify this expression 7b + 4 (-b + 3)
10 In a bond between an atom of carbon and an atom of fluorine, the fluorine atom has a (1) weaker attraction for electrons (2) stronger attraction for electron
Evaluate The Function when x = -2, 0, and 3 g ( x ) = - 3 x + 5 HELP PLEASE
how would you summarize neoclassical literature
A new combination of hereditary material is produced in offspring through _____. asexual reproduction sexual reproduction
One similarity between the Nile River valley and savanna lands in Africa is that they both (1) served as major barriers to the movement of people and goods (2)
what is the answer to 2/3 (x +2) -1/3(x-2)