Create a program the outputs the total cost of a lunch order. Users should be prompted to input the number of hamburgers, fries, and drinks they want and the program should print the total cost of the order. The hamburgers cost 2.00, fries cost 1.50, and drinks cost 1.00. Be creative and professional in prompting the user for the information and in displaying the output.

Respuesta :

Answer:

total = 0

hamburgers = int(input("Enter the number of hamburgers: "))

fries = int(input("Enter the number of fries: "))

drinks = int(input("Enter the number of drinks: "))

total = (hamburgers * 2.0) + (fries * 1.5) + (drinks * 1.00)

print("The total cost of the order is: " + str(total))

Explanation:

- Ask the user for the inputs

- In order to find the total cost, multiply each order cost with the number of orders. Then sum the each result.

- Print the total cost

ACCESS MORE
EDU ACCESS
Universidad de Mexico