You are Here: Home >< GCSEs

# Computing Homework due tomorrow python watch

Announcements
1. #05/10/17

HELP IT DOSENT WORK
#Student Meals

def meals():
meal = [["Monday", "Cereal", "Sandwiches", "Chicken"],
["Tuesday", "English", "Chicken wrap", "Pizza"],
["Wednesday", "Toast", "Bacon", "Chinese"],
return meal

def orderedlunch():
ordermeals = sorted(meals, key = lambda x:x[2])
for each in ordermeals:
print(each)
return ordermeals

def guess():
while True:
guesses = input('Please enter the name of the item you think you had this week: '
for each in meals:
for i in each:
if guess.title() in each[i]:
print(each)

return guess

print('''Hello there, what would you like to do?
1. Display all meals
2. Display all meals in ascending order of lunches
3. Guess what you had this week
4. Quit'''

isittrue = True

while isittrue:
try:
choice = int(input("Choose [1,2,3,4]: ")
if choice not in range(0,5):
print("This is not a suitable number. Back to the Main Menu, an error occured"
continue
except ValueError:
print("This is not a number. Back to the Main Menu, an error occured"
continue
if choice == 1:
meal = meals()
elif choice == 2:
lunch = orderedlunch()
elif choice == 3:
guesses = guess()
elif choice == 4:
isittrue = False
else:
print("Unknown Error"

def main():
main()

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: October 5, 2017
Today on TSR

### Exam Jam 2018

Join thousands of students this half term

Poll
Useful resources

## Study tools

### Essay expert

Learn to write like a pro with our ultimate essay guide.

See where you can apply with our uni match tool

### Make study resources

Create all the resources you need to get the grades.

### Create your own Study Plan

Organise all your homework and exams so you never miss another deadline.

### Resources by subject

From flashcards to mind maps; there's everything you need for all of your GCSE subjects.

### Find past papers

100s of GCSE past papers for all your subjects at your fingertips.