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 table has several fields related to computer data. You want the serial number (Sr. No.) field to increase by one every time you add a new record. Which data t
Different ways to make 15.. just gimme answers i am lazyyyyyyyyyyyyyyyyyyyyyyy... for my sister -.-
72/9 as a mixed number
A method of problem solving that uses the units that are part of a measurement to solve a problem
Who said god bless us everyone
What is 25.1 divided by 8 round to?
People questioned whether or not Paul was an apostle. True False
Find the missing number in the pattern. 1, 12, 23, _____, 45, 56 a. 31 b. 34 c. 37 d. 42
Kara is in the hospital suffering from alcohol poisoning. Which of these activities is most likely to have led to her condition? A. Drinking one drink B.
Industrialists such as john rockefeller used the principles of social darwinism to justify their accumulation of .wealth. social darwinism was also used to just