December SPECIAL! For a limited time only. Get 20% discount on a LIFETIME PRO account!Want more features on Pastebin? Sign Up, it's FREE!
tweet
Guest

Untitled

By: a guest on Sep 6th, 2015  |  syntax: Python  |  size: 0.18 KB  |  views: 77  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print  |  QR code  |  clone
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. def primes(how_many):
  2.         primes = []
  3.         i = 1
  4.         while len(primes) < how_many:
  5.                 for x in primes:
  6.                         if i % x == 0:
  7.                                 break
  8.                 else:
  9.                         primes.append(i)
  10.                 i += 1
  11.  
  12.         return how_many
clone this paste RAW Paste Data
Top