Quotes help make search much faster. Example: "Practice Makes Perfect"

Wednesday, November 28, 2012

Codecademy: "New Entries"


#sample solution


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'
menu['Water'] = 1.50
menu['Dessert'] = 4.50
menu['Bread'] = 2.50
print "There are " + str(len(menu)) + " items on the menu."
print menu

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts