summaryrefslogtreecommitdiffstats
path: root/static/lab2.py
diff options
context:
space:
mode:
authorraylu <raylu@cmu.edu>2011-05-14 02:28:30 -0400
committerraylu <raylu@cmu.edu>2011-05-14 02:28:30 -0400
commitf377715900bb5c95938ef749eeebb944c5c9bd2d (patch)
treed6cb38fb995e2cc718519a1fb54c9d1d6e187c74 /static/lab2.py
parent1e39d49f89fb818c7a1c3b7a487e89078f944042 (diff)
downloadpyc-f377715900bb5c95938ef749eeebb944c5c9bd2d.tar.xz
Add FAQ information, modify comments in labs 1 and 2
Diffstat (limited to 'static/lab2.py')
-rw-r--r--static/lab2.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/static/lab2.py b/static/lab2.py
index 7fa8840..5df3d7d 100644
--- a/static/lab2.py
+++ b/static/lab2.py
@@ -1,7 +1,11 @@
#!/usr/bin/env python
# Normally, there won't be two assignments overlapping, but we're still testing
-# so whatever.
+# so whatever. You may wish to look to http://effbot.org/zone/python-list.htm
+# for help, or the faster-paced http://docs.python.org/tutorial/controlflow.html.
+# Also, http://www.saltycrane.com/blog/2008/01/python-variable-scope-notes/ may
+# be of use. Note that I do not recommend anything but docs.python.org as a
+# general reference.
# total should return the sum of the numbers passed in
def total(numbers):
@@ -11,9 +15,6 @@ def total(numbers):
def onestring():
return 1
-# Your code will be run in a sandbox, so print statements are not allowed in
-# the required functions. The below code gets executed when you run the python
-# file; this should aid you in debugging/testing.
if __name__ == '__main__':
list1 = [1, 2, 3]
list2 = [-10, -10, -30]