Generation

generate functionTue, 28 Feb 2023

Checks if a number is even or odd and if it's one of them print even or odd respectively

def even_odd(number): if number % 2 == 0: print('even') else: print('odd') even_odd(5) even_odd(6)

Questions about programming?Chat with your personal AI assistant