Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Arbeitsheft 4
- # Seite 86
- primzahlen = [2]
- zahlen = list(range(2, 101))
- def streiche(vielfaches_von):
- return [zahl
- for zahl in zahlen
- if zahl % vielfaches_von != 0]
- primzahl = 2
- while len(zahlen) > 0:
- zahlen = streiche(primzahl)
- primzahl = zahlen.pop(0)
- primzahlen.append(primzahl);
- # print(primzahl, zahlen)
- print("PRIMZAHLEN:", primzahlen);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement