Hello, I am working on the following assignment where “tip” is an invalid
syntax. Can someone please tell me how to fix this? Here is what it should look
like:
Welcome to Restaurant Helper.
Enter the menu price for your meal: 100
Enter your tip percentage: 15 T
he price of the meal is: 100.00
The sales tax due is: 8.50
The tip amount is: 15.00
The total due is: 123.50
The program asks the diner for the menu price of the meal and what percentage
of that price the diner wishes to give as a tip.
The program then computes the sales tax amount, the tip amount, and the total
that will be paid to the restaurant.
The program should assume that the local sales tax is 8.5 percent. Also, the
program should compute the amount of the tip by applying the tip percentage
only to the menu price.
sales_tax = 0.085 * price
total_due = sales_tax * price + tip
tip = tip
print("Welcome to Restaurant Helper.")
price = int(input("Enter the menu price for your meal:")
tip = int(input("Enter your tip percentage:")
print("The price of the meal is:" , price)
print("The sales tax due is:" , sales_tax)
print("The tip amount is:" , tip)
print("the total due is:" , total_due)
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor