You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility

When i run the program i keep getting an error message on line 8 saying menu is not defined. I am unsure of how to proceed from here in regards to modifying the code. Thanks in advance.

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

That should be Menu instead of menu on the line
brunch_menu = menu('brunch', brunch_items, 1100, 1600)
because Menu is what you used for the class.

Thanks I managed to fix that error but I have another error on lines 1 and 10, name error name Menu is not defined. I thought the preceding block of code would define Menu’

I think its an indentation issue, that line should be outside the Menu class,
so it should not be indented at all.

I discovered that the problem is not specific to one line but re occurs in other cases as well, basically the same problem x 4

The semantics but be wrong though in the video walk through the code executes successfully.

menu should be Menu


early_bird_menu('Early Bird', early_bird_items, 1500, 1800)

should be

early_bird_menu = Menu('Early Bird', early_bird_items, 1500, 1800)

because Menu is the name of the class, and early_bird_menu should be an instance of the class (meaning a Menu object)