python print odd and even numbers code example
Example 1: program to find even numbers in python
m = int(input("Enter number"))
if m % 2 == 0:
print(m,"is an even number")
else:
print(m,"is an odd number")
Example 2: how to get odd numbers in python
# Here, rnge means range
rnge = int(input("Enter the range: "))
for i in range(1, rnge, 2):
print(i)