m = int(input("Enter number"))
if m % 2 == 0:
print(m,"is an even number")
else:
print(m,"is an odd number")
mynumber = int(input("Enter number")) # Ask an integer number to the user
if mynumber % 2 == 0: # % = modelo, It is equal to the rest of the division
print(mynumber, "is an even number")
else: # The rest of 7 / 2 is 2.5, not 0
print(mynumber, "is an odd number")
count1 = 0
for even_number in range(1, 20):
if even_number % 2 == 0:
count1 += 1
print(even_number)
print(f"we have {count1} even numbers")
a = int(input("Enter the number to find odd or even "))
if (a % 2) == 0:
print("{0} is Even".format(a))
else:
print("{0} is Odd".format(a))
# Python program to print Even Numbers in given range
start, end = 0, 50
# iterating each number in list
for num in range(start, end + 1):
# checking condition
if num % 2 == 0:
print(num, end = " ")