Program to print even or odd. An even number is a number that can be divided into two equal groups. An odd number is a number that cannot be divided into two equal groups. Even numbers end in 2, 4, 6, 8 and 0 regardless of how many digits they have (we know the number 5,917,624 is even because it ends in a 4!). Odd numbers end in 1, 3, 5, 7, 9. Input : 12 Output : even PROGRAM TO PRINT EVEN ODD #program to print even or odd. num = int(input("enter an integer ")) if num % 2 == 0: print("even") else: print("odd") Output enter an integer 23 odd
Programming for everybody...