# Python Program to Find Those Numbers which are Divisible by 7 and Multiple of 5 in a Given Range of Numbers

Given lower limit and upper limit , the objective is to explore the integers in the given range that are divisible by 7 and multiples of 5 in Python.

Examples:

Example1:

Input:

Enter some random lower limit =239
Enter some random lower limit =895

Output:

The number which is divisible by 7 and multiple of 5 :
Number = 245
Number = 280
Number = 315
Number = 350
Number = 385
Number = 420
Number = 455
Number = 490
Number = 525
Number = 560
Number = 595
Number = 630
Number = 665
Number = 700
Number = 735
Number = 770
Number = 805
Number = 840
Number = 875

Example2:

Input:

Enter some random lower limit =219
Enter some random lower limit =989

Output:

The number which is divisible by 7 and multiple of 5 :
Number = 245
Number = 280
Number = 315
Number = 350
Number = 385
Number = 420
Number = 455
Number = 490
Number = 525
Number = 560
Number = 595
Number = 630
Number = 665
Number = 700
Number = 735
Number = 770
Number = 805
Number = 840
Number = 875
Number = 910
Number = 945
Number = 980

## Program to Find Those Numbers which are Divisible by 7 and Multiple of 5 in a Given Range of Numbers in Python

There are numerous approaches to discover the numbers in the specified range that are divisible by 7 and multiples of 5, some of which are as follows:

The best and excellent way to learn a java programming language is by practicing Simple Java Program Examples as it includes basic to advanced levels of concepts.

### Method #1:Using for loop (Static input)

Approach:

• Give the lower limit range and upper limit range as static input.
• Use a for loop that goes from the lower to the upper range using range() function.
• Then using if conditional statement check whether the given iterator value is divisible by 7 and a multiple of 5.
• If the if condition statement is true then print it.
• Exit of Program

Below is the implementation:

# given lower limit range as static input
lowerlimit = 19
# given upper limit range as static input
upperlimit = 1289
# Then using if conditional statement check whether the given
# iterator value is divisible by 7 and a multiple of 5.
print("The number which is divisible by 7 and multiple of 5 :")
for numb in range(lowerlimit, upperlimit+1):
# If the if condition statement is true then print it.
if(numb % 7 == 0 and numb % 5 == 0):
print('Number =',numb)


Output:

The number which is divisible by 7 and multiple of 5 :
Number = 35
Number = 70
Number = 105
Number = 140
Number = 175
Number = 210
Number = 245
Number = 280
Number = 315
Number = 350
Number = 385
Number = 420
Number = 455
Number = 490
Number = 525
Number = 560
Number = 595
Number = 630
Number = 665
Number = 700
Number = 735
Number = 770
Number = 805
Number = 840
Number = 875
Number = 910
Number = 945
Number = 980
Number = 1015
Number = 1050
Number = 1085
Number = 1120
Number = 1155
Number = 1190
Number = 1225
Number = 1260

### Method #2:Using for loop (User input)

Approach:

• Scan the lower limit range and upper limit range as user input using int(input()) which converts string to integer.
• Use a for loop that goes from the lower to the upper range using range() function.
• Then using if conditional statement check whether the given iterator value is divisible by 7 and a multiple of 5.
• If the if condition statement is true then print it.
• Exit of Program

Below is the implementation:

# Scan lower limit range as user input
lowerlimit = int(input("Enter some random lower limit ="))
# Scan upper limit range as user  input
upperlimit = int(input("Enter some random lower limit ="))
# Then using if conditional statement check whether the given
# iterator value is divisible by 7 and a multiple of 5.
print("The number which is divisible by 7 and multiple of 5 :")
for numb in range(lowerlimit, upperlimit+1):
# If the if condition statement is true then print it.
if(numb % 7 == 0 and numb % 5 == 0):
print('Number =', numb)


Output:

Enter some random lower limit =239
Enter some random lower limit =895
The number which is divisible by 7 and multiple of 5 :
Number = 245
Number = 280
Number = 315
Number = 350
Number = 385
Number = 420
Number = 455
Number = 490
Number = 525
Number = 560
Number = 595
Number = 630
Number = 665
Number = 700
Number = 735
Number = 770
Number = 805
Number = 840
Number = 875