Advertisement
Guest User

Untitled

a guest
Jan 29th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. item = 'y'
  2. total = 0
  3. while item !='q':
  4. item = input("Enter item (q to terminate): egg, bacon, sausage, hash brown, toast, coffee, tea: ")
  5. quan = float(input("Enter quantity :"))
  6. item = item.lower()
  7. if item != 'egg' and item != 'bacon' and item != 'sausage' and item != 'hashbrown' and item != 'toast' and item != 'coffee' and item != 'tea' :
  8. print("This is not a valid item to order!")
  9. else:
  10. if item == 'egg':
  11. total = .99*quan
  12. elif item == 'bacon':
  13. total = 0.49*quan
  14. elif item == 'sausage' :
  15. total = 1.49 *quan
  16. elif item == 'hashbrown' :
  17. total == 1.19*quan
  18. elif item == 'toast':
  19. total == 0.79*quan
  20. elif item == 'coffee':
  21. total == 1.09*quan
  22. elif item == 'tea':
  23. total == 0.89*quan
  24. print("cost = " + total)
  25. tax = total*0.13
  26. print("tax = " + tax)
  27. totals = total+tax
  28. print("Total = "+ totals)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement