Then, we need to check if the number is divisible by 2 or not. If it is divisible by 2, then it is an even number. If it is not divisible by 2, then it is an odd number.
a) Using if statements:
```python
# Get input from user
num = int(input("Enter a number:
Show more…