Write a Python program to print even numbers between 1 to 100.

Updated: May 18


Python program to print even numbers between 1 to 100.




Program:

for num in range(1,100): if num%2==0: print (num) num=num+1

Output:

2 4 6 8 10

;

;

;

;

98



Recent Posts

See All

Python Program to add Two numbers

Program: num1 = int (input(" Please Enter the First Number: ")) num2 = int (input(" Please Enter the second number: ")) sum = num1+num2 print('The sum of {0} and {1} is {2}'.format(num1, num2, sum)) O