At Westonci.ca, we connect you with the answers you need, thanks to our active and informed community. Join our Q&A platform to get precise answers from experts in diverse fields and enhance your understanding. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.

Write a program that reads an integer and determines and prints whether it is odd or even.

Sagot :

num = int(input("Enter a number: "))

print(str(num)+" is even" if num % 2 == 0 else str(num)+" is odd")

I wrote my code in python 3.8. Best of luck.