Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cand=2
- test=range(2,cand+1)
- count=1
- while(count<100):
- #if cand%test==0: ##This was your first problem. Test is a list, not a number.
- for n in test: ##Try this 'for' loop instead.
- if cand%n==0:
- cand=cand+1
- else:count=count+1
- #if count==1000: ##You had another problem here. Your count values don't match.
- if count == 100:
- print cand
Advertisement
Add Comment
Please, Sign In to add comment