Write a function to print if a number is even or odd
Topic: Write a function to print if a number is even or odd
Solution
def oddeven(num): if num % 2 == 0: print('even') else: print('odd')
List all Python Programs
Solution
def oddeven(num): if num % 2 == 0: print('even') else: print('odd')