Find numbers divisible by number within a range

In this program, we will find the numbers divisible by number within the given range of numbers.

Steps to solve the program
  1. Use for loop to iterate over numbers between 0-100.
  2. If a number is divisible by 5, print the number.
				
					
for i in range(1,101):
    if i%5 == 0:
        print(i,end=" ")
				
			

Output :

				
					5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 
				
			

calculate the sum of all odd numbers between 1-100

construct the following pattern

Leave a Comment