Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- disc = 0.20
- to_go_cost = 1
- hb_types = ['No burger', 'Hamburger Jr',
- 'Hamburger Regular', 'Hamburger Super']
- hb_price = [0, 5.95, 7.95, 9.99]
- ff_types = ['No French fries', 'French fries Jr',
- 'French fries Regular', 'French fries Super']
- ff_price = [0, 1.25, 1.75, 2.50]
- shake_types = ['No shake', 'shake Jr', 'shake Regular', 'shake Super']
- shake_price = [0, 1.75, 2.75, 3.75]
- for hb in range(len(hb_types)):
- print(str(hb) + ".", end=' ')
- print(hb_types[hb] + " $", end='')
- print(hb_price[hb])
- burger = int(input("Please select burger:\n"))
- if burger != 0:
- hb_qty = int(input("How many?\n"))
- else:
- hb_qty = 0
- for ff in range(len(ff_types)):
- print(str(ff) + ".", end=' ')
- print(ff_types[ff] + " $", end='')
- print(ff_price[ff])
- fries = int(input("Please select fries:\n"))
- if fries != 0:
- ff_qty = int(input("How many?\n"))
- else:
- ff_qty = 0
- for sk in range(len(shake_types)):
- print(str(sk) + ".", end=' ')
- print(shake_types[sk] + " $", end='')
- print(shake_price[sk])
- shake = int(input("Please select fries:\n"))
- if shake != 0:
- sk_qty = int(input("How many?\n"))
- else:
- sk_qty = 0
- togo = input(f"\nA to go order cost additional ${to_go_cost}.\nIs this a to go order?(enter Y for yes or N for no)\n")
- if togo.upper() == 'N':
- to_go_cost = 0
- coupon = int(input("If you have a coupon, enter the coupon value else enter 0\n"))
- burgerCost = hb_price[burger] * hb_qty
- friesCost = ff_price[fries] * ff_qty
- shakeCost = shake_price[shake] * sk_qty
- grossCost = (burgerCost + friesCost + shakeCost)
- if burger == fries == shake:
- discValue = grossCost * disc
- else:
- discValue = 0
- netCost = grossCost - discValue - coupon + to_go_cost
- print(f"gross cost {grossCost:.2f}")
- print(f"discount value {discValue:.2f}")
- print(f"coupon amount {coupon:.2f}")
- print(f"to go cost {to_go_cost:.2f}")
- print(f"net cost {netCost:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement