Python Program to Print Even Number From 1 to 100 Using While Loop
Write
a Python Program to Display Even Number Between 1 to 100 using While Loop
Example: Code Program
n = 1while n <= 100:
if n%2 == 0:
print(n, end=" ")
n = n+ 1
If You Want the Program asked You to given Specific Range and
Display Even Number of Those Range
Example: Code Program
Related Python Program
Python Program to Check Whether a Number is Prime or Not
l = int(input("Enter Starting Numbeer:"))
h = int(input("Enter Ending Number:"))
print("Print Even Number Between ",l," and ",h)
for n in range(l,h+1):
if n%2 == 0:
print(n,end=",")
Output:h = int(input("Enter Ending Number:"))
print("Print Even Number Between ",l," and ",h)
for n in range(l,h+1):
if n%2 == 0:
print(n,end=",")
Related Python Program
Python Program to Check Whether a Number is Prime or Not
Post a Comment