Write a Python program to print all even numbers between 1 to 100 using while loop.
IDE: Visual Studio Code ( VSC ). Present: go2collage.
Download hole Program / Project code, by clicking following link:
Programming Code:
# Basic Python Program
# print even number between 1 to 100
num = int(input("Enter even number range between 1 to ....: "))
i = 1
while i <= num:
if i % 2 == 0:
print(i)
i = i + 1
# You can also print 2's table
Output:
0 Comments