Mater Dei Python Code
Thursday, February 20, 2014
Functions 7/20 -->6/19
def cube(n):
result = n**3
print "%dcube is%d"%(n,result)
return result
cube(5)
def by_three(n):
if(n%3 == 0):
return cube(n)
else:
return False
by_three(3)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment