At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Get our expert's

answer on brainly

SEE EXPERT ANSWER

Get your **free** account and access **expert** answers to this and **thousands** of other questions.

See more answers at brainly.com

Get this expert

answer on brainly

SEE EXPERT ANSWER

Get your **free** account and access **expert** answers to this and **thousands** of other questions

Here is what I came up with and it appears to work:
def isPrime(cand):
prime = None
if (cand==1) or (cand%2==0 and cand!=2):
prime = False
else :
for divisor in range(3,(cand/3+1),2):
if cand%divisor==0:
prime = False
if prime == False:
return False
else:
return True
Calling isPrime(cand) will return either True or False
eg.
>>> isPrime(9)
False
>>> isPrime(7919)
True
Hope this helps :)