Guest User

Untitled

a guest
Mar 1st, 2012
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. cand=2
  2. test=(2,3)
  3. count=1
  4. while(count<100):
  5. for n in test:
  6. if cand%n==0:
  7. cand=cand+1
  8. else:count=count+1
  9. if count == 100:
  10. print cand
  11. test+=(cand,) ##This will append cand into test.
  12. print test ##Another good idea to print some results so you can see what is happening.
Advertisement
Add Comment
Please, Sign In to add comment