New entries: HELP ME PLZ!


#1

Here Is MY CODE:

menu = {} # Empty dictionary
menu['Chicken Alfredo'] = 14.50
menu['Pizza A La Rome']=25.99
menu['Multi Cheese Mac&Cheese']=1.50 # Adding new key-value pair
print menu['Chicken Alfredo']
print menu['Pizza A La Rome']
print menu['Multi Cheese Mac&Cheese']

Your code here: Add some dish-price pairs to menu!

print "There are " + str(len(menu)) + " items on the menu."
print menu

what am I doing wrong? any assistance would be greatly appreciated


#2

thx for everything you contribute :smiley:


#3

We are given this to start with:

menu = {} # Empty dictionary
menu['Chicken Alfredo'] = 14.50 # Adding new key-value pair
print menu['Chicken Alfredo']
# Your code here: Add some dish-price pairs to 'menu'

Along with the instruction...

Add at least three more key-value pairs to the menu variable

You have added only two, and printed without being instructed to. Keeping it neat, and in the place set out for it,

# Your code here: Add some dish-price pairs to 'menu'
menu['Veal Parmesan'] = 12.50
menu['Liver & Onions'] = 10.95
menu['Steak & Lobster'] = 29.50
menu['Pork Chops'] = 11.50