Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Fall 2006 Midterm 2 Review: Hunting for errors

Not all programming errors are syntax errors, of course. For example, it's unlikely that you would really want to print the values of so many samples in a sound, especially if the values were guaranteed all to be the same! But that's not a syntax error. Colin Potts


a)
def func1(sound):
for s in getSamples(sound):
if s > 10000:
s = 10000
else:
p=s or p needs to be defined first at the very least
p = 15000
print p

b)
def func2():
f = open("C:\\world.txt","wt")
f.write("Go Jackets!")
f.write("13")
f.close( )

Stacy Schwaiger

Yup, that's right. -Bobby Mathew



Link to this Page