Friday, June 22, 2012
Last Question in Programming UT 1
def my7(a,b):
total = a+b
if (a > b):
diff = a - b
else:
diff = b - a
if (a == 7 or b == 7):
return True
elif (total == 7 or diff == 7):
return True
else:
return False
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment