Explore Westonci.ca, the premier Q&A site that helps you find precise answers to your questions, no matter the topic. Experience the ease of finding accurate answers to your questions from a knowledgeable community of professionals. Experience the ease of finding precise answers to your questions from a knowledgeable community of experts.

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.