Как найти, если значение равно или странно в Python
num = int(input("Enter a Number:"))
if num % 2 == 0:
print(num , "is even")
else:
print(num , "is odd")
Da Skeptical
num = int(input("Enter a Number:"))
if num % 2 == 0:
print(num , "is even")
else:
print(num , "is odd")
m = int(input("Enter number"))
if m % 2 == 0:
print(m,"is an even number")
else:
print(m,"is an odd number")
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))
number = int(input("Write a number:- "))
if number%2 == 0:
print("Even number")
else:
print("odd number")
num = int(input("Enter a number: "))
if (num % 2) == 0:
print("{0} is Even".format(num))
else:
print("{0} is Odd".format(num))
num = int(input("Number: "))
mod = num % 2
if mod == 0:
print(f"{num} is even")
else:
print(f"{num} is odd")