Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import scipy as sc
- def pierwsze(n):
- poczatek = 2;
- a = np.arange(2,n+1,1)
- b = np.array(a)
- print(b);
- for x in b:
- if x%2 == 0:
- if x!=2:
- b[(x-poczatek)] = 0
- elif x%3 == 0:
- if x!=3:
- b[(x-poczatek)] = 0
- tmp = (np.mod(b,3)!=0)
- print(b[tmp])
- n = 20
- pierwsze(n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement