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

Justin Townsend
Justin Townsend
4,418 Points

Function python

Ok, what am I not getting here!?

create_a_function.py
def is_odd(division):
    return 4 / 2 == 0

1 Answer

Steven Parker
Steven Parker
177,523 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