[Solved] Why do I receive syntax error at n in the line If n % i? [closed]


Correct Code:

def prime_chk(upper):
    print("Prime numbers between",0,"and",upper,"are:")
    for num in range(0,upper + 1):
       # prime numbers are greater than 1
       if num > 1:
           for i in range(2,num):
               if (num % i) == 0:
                   break
           else:
               print('Well done! You have found a prime : ',num )

n = int(input('Number to be checked:'))
prime_chk(n)

solved Why do I receive syntax error at n in the line If n % i? [closed]