Python Python Basics (2015) Number Game App Even or Odd

Conner Williams
PRO
Conner Williams
Pro Student 3,305 Points

why does this not work?

how do I make this correct?

even.py
def even_odd(number): 
    number = 4
    if number % 2 == 0:
        print("True")
    else:
        print("False")

1 Answer

Stuart Wright
Stuart Wright
41,071 Points

A couple of hints to send you in the right direction:

  • you should not hardcode number = 4 inside your function. You want your function to work for any value of number that is passed in.
  • you need to return something from your function, not print it.