I try to print out odd and even number but I get error message at line 2 mod = num % 2
Here is the code
Here is the code
num = input ("Enter a number:") mod = num % 2 if mod > 0: print("You picked an even number") else: print("You picked an odd number")and here is the error code
Error: C:\Users\Lenovo\PycharmProjects\Scientific\venv\Scripts\python.exe C:/Users/Lenovo/.PyCharmCE2018.2/config/scratches/age.py
Enter a number:6
Traceback (most recent call last):
File "C:/Users/Lenovo/.PyCharmCE2018.2/config/scratches/age.py", line 2, in <module>
mod = num % 2
TypeError: not all arguments converted during string formatting
Process finished with exit code 1
What am I doing wrong?