Answers for "how to find if a value is even or odd in python"

10

how to check if a number is odd python

num = int(input("Enter a number: "))  
if (num % 2) == 0:  
   print("{0} is Even number".format(num))  
else:  
   print("{0} is Odd number".format(num))  
Posted by: Guest on May-21-2020
1

how to find if a value is even or odd in python

num = int(input("Enter a Number:"))
if num % 2 == 0:
  print(num , "is even")
else:
  print(num , "is odd")
Posted by: Guest on June-06-2021
1

odd or even in python

n = int(input("Enter a number: "))
print(n,"is Even.") if (n % 2) == 0 else print(n,"is Odd.")
Posted by: Guest on April-16-2021
0

how to check if a number is even or odd in python

num = int(input("Enter a number: "))
if (num % 2) == 0:
   print("{0} is Even".format(num))
else:
   print("{0} is Odd".format(num))
Posted by: Guest on April-26-2021

Code answers related to "how to find if a value is even or odd in python"

Python Answers by Framework

Browse Popular Code Answers by Language