Comm4nd0

strange error

Jul 7th, 2015
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.32 KB | None | 0 0
  1. import menu
  2.  
  3. # Print a welcome message
  4. # Print the menu
  5. # Allow user to enter items from the menu
  6. # Add them up and print a receipt.
  7.  
  8. receipt = []
  9.  
  10. def welcome():
  11.     print"Welcome to your till, start by entering the items 1 at a time"
  12.  
  13.  
  14. def enter_items():
  15.     input = True
  16.     while input == True:
  17.         item = raw_input("Enter item number: ")
  18.  
  19.  
  20. A = menu.Menu("Chicken Strips",3.50)
  21. B = menu.Menu("French Fries",2.50)
  22. C = menu.Menu("Hamburger",4.00)
  23. D = menu.Menu("Hotdog",3.50)
  24. E = menu.Menu("Large Drink",1.75)
  25. F = menu.Menu("Medium Drink",1.50)
  26. G = menu.Menu("Milk Shake",2.25)
  27. H = menu.Menu("Salad",3.75)
  28. I = menu.Menu("Small Drink",1.25)
  29.  
  30.  
  31. welcome()
  32. print B
  33. enter_items()
  34.  
  35. ##################################################################################################
  36. #seperate file
  37. class Menu():
  38.     def __init__(self, name, price):
  39.         self.name = name
  40.         self.price = price
  41.  
  42.     def print_menu(self):
  43.         print"[A] Chicken Strips - $3.50"
  44.         print"[B] French Fries - $2.50"
  45.         print"[C] Hamburger - $4.00"
  46.         print"[D] Hotdog - $3.50"
  47.         print"[E] Large Drink - $1.75"
  48.         print"[F] Medium Drink - $1.50"
  49.         print"[G] Milk Shake - $2.25"
  50.         print"[H] Salad - $3.75"
  51.         print"[I] Small Drink - $1.25"
  52.         print"[P] to print receipt"
Advertisement
Add Comment
Please, Sign In to add comment