Print all Numbers in a Range Divisible by a Given Number in python

Share on facebook
Share on twitter
Share on pinterest

In this Basic Python Program, we will have a look at How to “Print all numbers in a range divisible by a given number” with the help of Python Programming Language.

Python Program to Print All Numbers In A Range Divisible By a Given Number

lower=int(input("Enter lower range limit:"))

upper=int(input("Enter upper range limit:"))

n=int(input("Enter the number to be divided by:"))

for i in range(lower,upper+1):

    if(i%n==0):

        print(i)

In the above Python Program, we have print all the numbers in a given range

Subscribe to our Newsletter

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Share this post with your friends

Share on facebook
Share on google
Share on twitter
Share on linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *