An even or odd checker

Write code · Basic · §6.2, §8.2, §9.1 Talking to your program

Complete the function is_even_or_odd, which returns "even" if the integer n is even and "odd" if it is odd. The two lines at the bottom call the function with the number you type and print the result. Keep input() outside the function.

Starter code

def is_even_or_odd(n):
    # Write your code here
    pass

n = int(input("Number: "))
print(is_even_or_odd(n))

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.