Write a program to print all the even numbers in a range


Topic: Write a program to print all the even numbers in a range

Solution

r1, r2 = 1, 28
for _ in range(r1, r2+1):
  if _%2 == 0:
    print(_)



List all Python Programs