1.

Write a program in Python to print the numbers from 100 to 300 which are divisible by both 5 and 7.1Add File5 pointsWrite a program in Python to erade the students according to the following​

Answer»

code:for i in range(100, 300):    if i%5 == 0 and i%7 == 0:        print(i) Output:105 140 175 210 245 280This is has been done using a for loop, which is an ITERATION statement. It has a variable that changes its value each time it LOOPS. In this case, the STARTING value given was 100 and the ending value given was 300, and the changing variable 'i', takes the values of all the numbers between them. If it satisfies the if-else clause, it gets PRINTED, if not, it continues TILL it reaches the limit, which is 300.



Discussion

No Comment Found