"Roelof Wobben" <rwob...@hotmail.com> wrote
Others have pointed out the lack of indentation.
I'll point out some shortcuts you can use...

def is_even(argument):
   remainder= argument%2
   if remainder == 0 :
       return True
   else :
       return False

You can abbreviate this to just

def is_even(arg):
   return not arg%2

def is_odd(argument):
 uitkomst=is_even(argument)
return uitkomst

and this to:

def is_odd(arg):
  return not is_even(arg)

HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to