xxxxxxxxxx
n = int(input("Enter a number: "))
print(n,"is Even.") if (n % 2) == 0 else print(n,"is Odd.")
xxxxxxxxxx
n=int(input("Enter n :"))
if(n%2==0):
print(n," is even number");
else:
print(n," is odd number");
xxxxxxxxxx
num = int(input("Number: "))
mod = num % 2
if mod == 0:
print(f"{num} is even")
else:
print(f"{num} is odd")
xxxxxxxxxx
number = int(input("Write a number:- "))
if number%2 == 0:
print("Even number")
else:
print("odd number")
xxxxxxxxxx
num = int(input("Enter a number: "))
if (num % 2) == 0:
print("{0} is Even".format(num))
else:
print("{0} is Odd".format(num))
xxxxxxxxxx
Number = int(input("Write any number:- "))
Opration = Number%2
if Opration == 0:
print("it's odd number")
else:
print("It's even number")
xxxxxxxxxx
num = int(input("Enter a number: "))
if (num % 2) == 0:
print("{0} is Even".format(num))
else:
print("{0} is Odd".format(num))
xxxxxxxxxx
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')
xxxxxxxxxx
even = []
odd = []
for number in range(50, 71):
if number % 2 == 0:
odd.append(number)
else:
even.append(number)
print(f"Even: {even}\nOdd: {odd}")