Computer Science, asked by Basudebpaul567, 1 month ago

Write a Python Program to Print Prime Numbers From 1 to N using for and if loop . ​

Answers

Answered by pruthagauri
0

Answer:

Python Program to Print all Prime Numbers between an Interval

1.#Take the input from the user:

2.lower = int(input("Enter lower range: "))

3.upper = int(input("Enter upper range: "))

4.for num in range(lower,upper + 1):

5.if num > 1:

6.for i in range(2,num):

7.if (num % i) == 0:

8.break.

Explanation:

Hope this answer will help you

Great Learning

Similar questions