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

Rafael Maida
Rafael Maida
2,307 Points

odd numbers

i am looking to create a fucntion that determines if a number is even/odd

create_a_function.py
def is_odd (num):
    (float(num) % 2) > 0

1 Answer

Steven Parker
Steven Parker
177,523 Points

You're really close! You just need a "return" keyword to give your result back to the caller.

Also, while it won't affect passing the challenge, you don't need to convert the number with "float".