Answers for "program to print even numbers in python"

8

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")
Posted by: Guest on July-24-2020
1

print even numbers in python

# Print even numbers python

lower_limit = 0
max_limit = 100
for i in range(lower_limit, max_limit):
  if i%2 == 0:	# even numbers are divisible by 2. i%2 will give the remainder when i is divided by 2. if i is even, the remainder will always be 2.
    print(i)

#
Posted by: Guest on July-31-2021

Code answers related to "program to print even numbers in python"

Python Answers by Framework

Browse Popular Code Answers by Language