Question

use python to print numbers which are divisible by 7 and multiple of 5, between 1500...

use python to print numbers which are divisible by 7 and multiple of 5, between 1500 and 2700 (both included). NOTE: use a while loop and for loop at different time

0 0
Add a comment Improve this question Transcribed image text
Answer #1

i = 1500
while(i<=2700):
    if(i%7 == 0 and i%5 == 0):
        print(i)
    i += 1

================================

for i in range(1500,2701):
    if(i%7 == 0 and i%5 == 0):
        print(i)

================================

1505
1540
1575
1610
1645
1680
1715
1750
1785
1820
1855
1890
1925
1960
1995
2030
2065
2100
2135
2170
2205
2240
2275
2310
2345
2380
2415
2450
2485
2520
2555
2590
2625
2660
2695


Add a comment
Know the answer?
Add Answer to:
use python to print numbers which are divisible by 7 and multiple of 5, between 1500...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT