0

Write a Python program to find those numbers which are divisible by 7 and multiple of 5, between 1500 and 2700...can you help me

13th Apr 2020, 7:28 PM
Ya7iax
Ya7iax - avatar
5 ответов
+ 2
Ya7iax You need a loop which starts at 1500 and ends at 2700. Now you need to check every number. Here you will need an if statement. divisble by 7: 7, 14, 28, 35... multiple of 5: 5, 10, 15, 20, 25, 30, 35... divisible by 7 and by 5 = divisible by 35 (7 * 5) n % 35 == 0 % is the modulus operator which gives you the remainder of a division.
13th Apr 2020, 7:57 PM
Denise Roßberg
Denise Roßberg - avatar
+ 1
It is every number in the range from 1505 to 2701 step 35. 1505 is the first number divisible by 7 and multiple of five after 1500. I have told you almost anything you need to know without giving you the code.
13th Apr 2020, 7:47 PM
Paul
Paul - avatar
+ 1
Thank you so much
13th Apr 2020, 8:06 PM
Ya7iax
Ya7iax - avatar
0
Hello Ya7iax Can you show us your attempt? Or do you need help to understand your task?
13th Apr 2020, 7:38 PM
Denise Roßberg
Denise Roßberg - avatar
0
As you know I am new user so i don't know how I started in this question.
13th Apr 2020, 7:47 PM
Ya7iax
Ya7iax - avatar