Answers for "if even python"

0

odd or even python

num = int(input("Number: "))
mod = num % 2
if mod == 0:
    print(f"{num} is even")
else:
    print(f"{num} is odd")
Posted by: Guest on December-04-2021
0

python odd or even

n = int(input("Enter a number: "))
print(["even","odd"][n % 2])
Posted by: Guest on August-05-2021
5

python even or odd

injd = int(input('Enter a number'))
n = injd % 2
if n > 0:
  print('This is an odd number')
else:
  print('This is an even number')
Posted by: Guest on October-26-2020
0

even in python

if (num % 2) == 0:
Posted by: Guest on March-28-2021

Python Answers by Framework

Browse Popular Code Answers by Language