Computer Science, asked by angel74939, 2 months ago

Write a program to display all prime odd numbers within a range using FOR loop.

MathsLover00..iska answer btado yr..please
And please tell me your name and age if you are comfortable with it.
And meri request bhi accept krlo

Answers

Answered by mansisharmaknp2000
0

For Example:

#Take the input from the user:

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

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

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

if num > 1:

for i in range(2,num):

if (num % i) == 0:

break

else:

print(num)

This example will show the prime numbers between 10 and 50.

Similar questions