0 votes
405 views
in Python by (98.9k points)
edited
Python Program to Check if a Number is Odd or Even

1 Answer

0 votes
by (98.9k points)
selected by
 
Best answer

num = int(input("Enter a number: "))
if (num % 2) == 0:
   print("{0} is Even".format(num))
else:
   print("{0} is Odd".format(num))

 

Related questions

0 votes
1 answer 416 views
0 votes
1 answer 365 views
asked Jul 20, 2022 in C programming by Doubtly (98.9k points)
0 votes
1 answer 358 views
asked Aug 21, 2022 in Discuss by codelikepro (3.5k points)
0 votes
1 answer 339 views
0 votes
1 answer 370 views
0 votes
1 answer 368 views
asked Jun 11, 2022 in Python by Doubtly (98.9k points)

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

648 users

...