11. Write a python program to check the input number is an odd number or even number?
The output is:
Expected Sample Answer:
Enter a number: 5
This is an odd number.
Sample Answer:
inp_number = int(input("Enter a number: ")) result = inp_number % 2 if result > 0: print("This is an odd number.") else: print("This is an even number.")
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)