This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/python/examples/multiply.py

23 lines
293 B
Python
Raw Normal View History

2012-11-05 13:49:15 +00:00
i = 5
def f(arg=i):
print arg
2012-10-23 10:16:32 +01:00
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