Due to the influence of the coronavirus, I had nothing to do because the school was closed, so I made a program to find out prime numbers.
Prime_number_list=[]
b=input("Please specify the range to look for")
b=int(b)
for a in range(b):
a=a+1
number=0
for i in range(a):
if a%(i+1)==0:
number+=1
if number==2:
Prime_number_list.append(a)
print(Prime_number_list)
Recommended Posts