+ 1
error in this program
num=int(input("Enter any number")) lin=int(num/2)+1 for i in range (2,lim): rem=num%i if rem==0: print("number entered by you is not a prime number",num) break else : print (num,"number entered by you is a prime number")
4 Answers
+ 3
It seems to me at first sight that the the names of the variables on line 2 and line 3 are different => lim and lin .
+ 2
Your second line should start with âlimâ but you have a typo and it currently says âlinâ.
+ 1
you replace the lin variable to lim in for loop.
0
also, int declaration on line 2 is not needed