support lists

This commit is contained in:
Vítor Santos Costa
2012-10-23 10:16:32 +01:00
parent 84a5f518bf
commit 0caac30c11
2 changed files with 55 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
def multiply(a,b):
print "Will compute", a, "times", b
c = 0
for i in range(0, a):
c = c + b
return c
def square(a,b):
return [a*a,b*b]
def lsquare(a):
print a
b = []
for i in a:
b.append(i*i)
return b