write a python program to print list of prime numbers between 1 to20
Answers
Answered by
1
Answer:
Python Program to Print all Prime Numbers between an Interval
#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.
Explanation:
mark me as a brainliest
Answered by
5
Answer:
Explanation:
x=int(input("Input number: "))
y=int(input("Input number: "))
if x>= 1 and y <= 20:
for i in range(x,y):
cont=1
for j in range(1,i):
if (i % j == 0):
cont += 1
if cont <= 2:
print(i)
else:
print("No between 1 and 20")
Attachments:
Similar questions