def funcA(x): # function describiing the oddness or eveness of an x number
if x%2 == 0:
print x, "is even"
else:
print x, "is odd"
def funcB(y): # function describiing the oddness or eveness of an y number
if y%2 ==0:
print y, "is even"
else:
print y, "is odd"
# no more functions after this line
x=input("Please type a number: ")
print xy=input("Please type another number: ")
print yif x>y:
print x,("is greater than"),y
else:
print y,("is greater than"),xif y and x >=0:
print ("Both are positive numbers!")print funcA(x)
print funcB(y)
And this is the output in IDLE after execution:
Please type a number: 5
5
Please type another number: 10
10
10 is greater than 5
Both are positive numbers!
5 is odd
None
10 is even
None
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
