0

def my_func(n,i,c): if i==0: if c==2: return True else: return False if n%i==0: c=c+1 return n,i-1,c n=int(input()) ans=my_func(n,n,0) if ans==True: print ("prime") else: print('not prime')

I am getting wrong output

19th Oct 2016, 2:14 PM
khateeb anwer
khateeb anwer - avatar
1 Answer
+ 3
change return n,i-1,c to return my_func(n,i-1,c) and it's done
19th Oct 2016, 5:09 PM
Sunera
Sunera - avatar