I'm getting the syntax error, that return is outside the func. I have rewritten the code but the problem persists. What am I doing wrong?
def prime_1(mn):
if mn < 2:
return 0
prime_in = [2]
x = 3
while x <= mn:
for y in prime_in:
if x % y == 0:
x += 2
break
else:
prime_in.append(x)
x += 2
print(prime_in)
return len(prime_in)