Ask a Question

Python # just wrote program for prime number but in solution answer every answer is repeating more than once?
for num in range(1, 200):
if num>1:
for i in range(2, num):
if num%i==0:
break
else:
print(num)

just wrote program for prime number but in solution answer every answer is repeating more than once?
for num in range(1, 200):
if num>1:
for i in range(2, num):
if num%i==0:
break
else:
print(num)

Fuel your ambition, discover your passion and achieve your professional goals with LetsUpgrade.

Sign Up Now