Share
Prime numbers using for loop
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Write a program to find all prime numbers between 25 and 50.
Answer ( 1 )
for num in range(25, 51):
if num > 1:
for i in range(2, num):
if (num % i) == 0:
break
else:
print(num)