Python Practice Creating and Using Functions in Python Practice Functions That's Odd

Justin Townsend
Justin Townsend
4,720 Points

Function python

Ok, what am I not getting here!?
def is_odd(division):
    return 4 / 2 == 0

1 Answer

Steven Parker
Steven Parker
200,540 Points

Here's a few hints:

  • the function needs to test the argument (division) but it currently tests fixed values
  • the remainder operator might be more useful than the division operator for this
  • remember to test in such a way that the value will be True when the argument is not divisible by 2