Iam getting syntax error near else part and how to set right indendation?
I tried running on Py3
num=int(input("enter the no"))
if(num>1):
for i in range(2,num):
if(num%i==0):
print("not prime",num)
break;
else:
print("prime",num)
else:
print("not prime",num)
Aucun commentaire:
Enregistrer un commentaire