Primality Test Problem Code: PRB01
cook your dish here
n=int(input())
def check_prime(num):
if(num%2==0):
return False
else:
for j in range(3,(num//3)+1,2):
#print(j)
if(num%j==0):
return False
return True
for i in range(n):
num=int(input())
if(check_prime(num)):
print(“yes”)
else:
print(“no”)
ssjgz
2
Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! 
Edit: Actually, assuming it’s CodeChef: Practical coding for everyone : consider the test input:
2
1
2
Thanks I can see the issue , its now resolved for me

1 Like