8 Program to print all even numbers between 1 to 100 using while loop in Python

Program:

i = 1

while i <= 100:

    if i %2 == 0 :

        print(i,end="  ")

    i+=1

Output:

print all even numbers between 1 to 100 using while loop in Python

Previous
Next Post »