def isPrime(num,div=2):
if(num==div):
return True
elif(num % div == 0):
return False
else:
return isPrime(num,div+1)
birinci2012 0 Newbie Poster
Gribouillis 1,391 Programming Explorer Team Colleague
slate 241 Posting Whiz in Training
Gribouillis commented: ugly code :) +14
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.