#Credits to NPTEL MOOC, Programming, Data Structures & Algorithms in 
#Python by Madhavan Mukund, Chennai Mathematical Insti
tute

def divides(m,n):
  if n%m == 0:
    return(True)
  else:
    return(False)

def even(n):
  return(divides(2,n))

def odd(n):
  return(not divides(2,n))

Source link

Divison with multiple conditions

Leave a Reply

Your email address will not be published. Required fields are marked *