In: Computer Science
For PYTHON
You come into the fast food restaurant with a friend. Each of you orders separately, but everything will appear on one receipt. Print the total per cost person and the total of the receipt. Calculate the sales tax and print the total cost assuming the following prices:
Fries are $3.50
Burger are $5.00
Drinks are $1.00
Sales tax rate is 7.25%
#python program for restaurant
n=int(input("Enter total items ordered"))
total=0
for i in range(n):
x=float(input("Enter price of item"))
total+=x
#calculating total and split
print("Your order total is %f"%total)
total=total/2
print("Each of you has to pay %f"%total)
#calculating sales tax and split
total=(total*2)+((total*2)*7.25/100)
print("Your order total with taxes if %f"%total)
total=total/2
print("Each of you has to pay %f with taxes"%total)
Sample Output: