Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def breakfast():
- item = 'a'
- total = 0
- while item != 'q':
- item = input("Enter item (q to terminate): egg, bacon, sausage, hash brown, toast, coffee, tea: ")
- item = item.lower()
- if item != 'egg' and item != 'bacon' and item != 'sausage' and item != 'hashbrown' and item != 'toast' and item != 'coffee' and item != 'tea' and item!= 'q':
- print("This is not a valid item to order!")
- else:
- quan = float(input("Enter quantity :"))
- if item == 'egg':
- total = .99*quan
- elif item == 'bacon':
- total = 0.49*quan
- elif item == 'sausage' :
- total = 1.49 *quan
- elif item == 'hashbrown' :
- total == 1.19*quan
- elif item == 'toast':
- total == 0.79*quan
- elif item == 'coffee':
- total == 1.09*quan
- elif item == 'tea':
- total == 0.89*quan
- print("cost = " + str(total))
- tax = total*0.13
- print("Tax = " + str(tax))
- totals = total+tax
- print("Total = "+ str(totals))
- breakfast()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement