My Jupyter Notebook gets stuck in run mode whenever i run the shell with the following code:
def is_prime(num):
if num < 2:
return False
for x in range(2, num - 1):
if num % x == 0:
return False
return True
prime_list = []
num = 2
while True:
if is_prime(num):
prime_list.append(num)
num += 1
if len(prime_list) == 10002:
break
print(prime_list[-1])
Could someone please run this code on their computer and tell me what the output is? I'd really appreciate any answer.