0

What is wrong with this code to determine if a number is prime o not?

n=int(input("enter positive number")) if(n>0): div=2 conta=0 while conta<1 and div<n: if n%div==0: conta==conta+1 else : div==div+1 if conta==0: print("prime") else : print(" not prime")

4th Apr 2019, 2:30 PM
Fernanda Aguilar
Fernanda Aguilar - avatar
2 Answers
+ 2
conta=conta+1 div=div+1
4th Apr 2019, 2:48 PM
Anna
Anna - avatar
+ 1
thank you haha
4th Apr 2019, 3:06 PM
Fernanda Aguilar
Fernanda Aguilar - avatar