Como encontrar se um valor é par ou ímpar no 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")
n = int(input("Enter a number: "))
print(n,"is Even.") if (n % 2) == 0 else print(n,"is Odd.")
number = int(input("Write a number:- "))
if number%2 == 0:
print("Even number")
else:
print("odd number")
num = int(input("Number: "))
mod = num % 2
if mod == 0:
print(f"{num} is even")
else:
print(f"{num} is odd")