Browse Source

Convert starter code to soft tabs

raylu 14 years ago
parent
commit
f3f08c4835
2 changed files with 17 additions and 17 deletions
  1. 2 2
      static/lab1.py
  2. 15 15
      static/lab2.py

+ 2 - 2
static/lab1.py

@@ -5,7 +5,7 @@
 # Your code will be run in a sandbox, so print statements are not allowed.
 
 def test():
-	return 0
+    return 0
 
 if __name__ == '__main__':
-	print test()
+    print test()

+ 15 - 15
static/lab2.py

@@ -5,28 +5,28 @@
 
 # total should return the sum of the numbers passed in
 def total(numbers):
-	return numbers[0]
+    return numbers[0]
 
 # onestring should return 1 the first time it's called and 'ring' the second time
 def onestring():
-	return 1
+    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]
-	print 'sum of list1:', total(list1)
-	print 'sum of list2:', total(list2)
+    list1 = [1, 2, 3]
+    list2 = [-10, -10, -30]
+    print 'sum of list1:', total(list1)
+    print 'sum of list2:', total(list2)
 
-	print # blank line
+    print # blank line
 
-	if onestring() == 1:
-		print 'got 1 the first time!'
-	else:
-		print 'onestring didn\'t return 1 the first time :('
-	if onestring() == 'ring':
-		print "got 'ring' the second time!"
-	else:
-		print "onestring didn't print 'ring' the second time D:"
+    if onestring() == 1:
+        print 'got 1 the first time!'
+    else:
+        print 'onestring didn\'t return 1 the first time :('
+    if onestring() == 'ring':
+        print "got 'ring' the second time!"
+    else:
+        print "onestring didn't print 'ring' the second time D:"