Python Program to Find Numbers Divisible by 7 and Multiple of 5 in a Given Range
Given a range of numbers, the task is to write a Python program to find numbers divisible by 7 and multiple of 5.
Input:Enter minimum 100 Enter maximum 200 Output: 105 is divisible by 7 and 5. 140 is divisible by 7 and 5. 175 is divisible by 7 and 5. Input:Input:Enter minimum 29 Enter maximum 36 Output: 35 is divisible by 7 and 5.
A set of integers can be checked for divisibility by 7 and 5 by performing the modulo operation of the number with 7 and 5 respectively, and then checking the remainder. This can be done in the following ways :
35 is divisible by 7 and 5.
This can also be done by checking if the number is divisible by 35, since the LCM of 7 and 5 is 35 and any number divisible by 35 is divisible by 7 and 5 and vice versa also.
70 is divisible by 7 and 5. 105 is divisible by 7 and 5. 140 is divisible by 7 and 5.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course