Hi!
Can someone please help me understand what is wrong with this code?
Can someone please help me understand what is wrong with this code?
print("The prime numbers are:")
num = 0
div = 1
check = 0
while True:
pri = (num/div)
try:
int(pri)
check += 1
if div > num and check == 2:
print(num)
num += 1
div = 1
check = 0
else:
div += 1
except ValueError:
if div > num and check == 2:
print(num)
num += 1
div = 1
check = 0
else:
div += 1I'm trying to make a program that showes all the prime numbers.
