from errors_01 import favorite_ice_cream favorite_ice_cream() from errors_02 import print_friday_message print_friday_message() def some_function() msg = "hello, world!" print msg return msg def some_function(): msg = "hello, world!" print msg return msg def some_function(): msg = "hello, world!" print msg return msg def some_function(): msg = "hello, world!" print msg return msg def another_function print "Syntax errors are annoying." print "But at least python tells us about them!" print "So they are usually not too hard to fix." print a print hello for number in range(10): count = count + number print "The count is: " + str(count) Count = 0 for number in range(10): count = count + number print "The count is: " + str(count) for number in range(10): # use a if the number is a multiple of 3, otherwise use b if (Number % 3) == 0: message = message + a else: message = message + "b" print message letters = ['a', 'b', 'c'] print "Letter #1 is " + letters[0] print "Letter #2 is " + letters[1] print "Letter #3 is " + letters[2] print "Letter #4 is " + letters[3] us_state_capitals = { 'california': 'sacramento', 'virginia': 'richmond', 'new york': 'albany', 'massachusetts': 'boston' } print "The capital of Oregon is: " + us_state_capitals['oregon'] us_state_capitals = { 'california': 'sacramento', 'virginia': 'richmond', 'new york': 'albany', 'massachusetts': 'boston' } print "The capital of Massachusetts is: " + us_state_capitals['massachussetts'] seasons = { 'spring': ['march', 'april', 'may'], 'summer': ['june', 'july', 'august'], 'fall': ['september', 'october', 'november'], 'winter': ['december', 'january', 'february'] } print "The first month in spring is: " + seasons['spring'][0] print "The third month in summer is: " + seasons['summer'][3] print "The third month in fall is: " + seasons['fal'][3] print "The second month in winter is: " + seasons['Winter'][1] file_handle = open('myfile.txt', 'r') file_handle = open('myfile.txt', 'w') file_handle.read()