Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fruits = []
- meats = []
- dairy = []
- vegetables = []
- sauces = []
- sweets = []
- #should add option to add nothing to each category
- #should restrict total # of items to limited amount
- #should add budget, each item costs certain amount
- #should print list of recipes you can make with added items.
- print("\n\n\n:::Your fridge is empty.:::")
- def show_fridge():
- """Shows contents of all types currently in the fridge."""
- print("\n:::::Here's everything in the fridge:::::")
- print("\n:::Fruits:::")
- for fruit in fruits:
- print(fruit.title())
- print("\n:::Vegetables:::")
- for vegetable in vegetables:
- print(vegetable.title())
- print("\n:::Meats:::")
- for meat in meats:
- print(meat.title())
- print("\n:::Dairy:::")
- for dair in dairy:
- print(dair.title())
- print("\n:::Sauces:::")
- for sauce in sauces:
- print(sauce.title())
- print("\n:::Sweets:::")
- for sweet in sweets:
- print(sweet.title())
- def add_fruit_fridge():
- """Puts fruit in the fridge until user terminates loop."""
- while True:
- print("\n:::What fruits do you want to add?::: ")
- fruits.append(input("\n"))
- answer = input("Anything else? Please enter Y or N: ")
- if answer == 'Y':
- print("\n")
- elif answer == 'N':
- break
- else:
- break
- def add_veg_fridge():
- """Puts vegetables in the fridge until user terminates the loop."""
- while True:
- print("\n:::What vegetables would you like to add?:::" )
- vegetables.append(input("\n"))
- answer = input("Any other vegetables you want to add? Y or N: ")
- if answer == 'Y':
- vegetables.append(input("\n:::What vegetables do you want to add?::: "))
- elif answer == 'N':
- break
- else:
- break
- def add_meats_fridge():
- """Puts meats in the fridge until user terminates the loop."""
- while True:
- print("\n:::What meats do you want to add?:::")
- meats.append(input("\n"))
- answer = input("Any other meats you want to add? Y or N: ")
- if answer == 'Y':
- meats.append(input("\n:::What other meats do you want to add?::: "))
- elif answer == 'N':
- break
- else:
- break
- def add_dairy_fridge():
- """Puts dairy items in the fridge until user terminates the loop."""
- while True:
- print("\n:::What dairy items would you like to add?:::")
- dairy.append(input("\n"))
- answer = input("Do you want to add more dairy items? Y or N: ")
- if answer == 'Y':
- dairy.append(input("\n:::What dairy items would you like to add?:::"))
- elif answer == 'N':
- break
- else:
- break
- def add_sauces_fridge():
- """Puts sauces in the fridge until user terminates the loop."""
- while True:
- print("\n:::What sauces do you want to add?:::")
- sauces.append(input("\n"))
- answer = input("Do you want to add more sauces to the fridge? Y or N: ")
- if answer == 'Y':
- sauces.append(input("\n::What kinds of sauces do you want to add?:::"))
- elif answer == 'N':
- break
- else:
- break
- def add_sweets_fridge():
- """Puts sweets in the fridge until user terminates the loop."""
- while True:
- print(":::What sweets do you want to add?:::")
- sweets.append(input("\n"))
- answer = input("Do you want to add more sweets to the fridge? Y or N: ")
- if answer == 'Y':
- sweets.append(input("\n:::What sweets do you want to add?:::"))
- elif answer == 'N':
- break
- else:
- break
- add_fruit_fridge()
- add_veg_fridge()
- add_meats_fridge()
- add_dairy_fridge()
- add_sauces_fridge()
- add_sweets_fridge()
- show_fridge()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement