Getting primenumbers?

Hello,

is this not from math ?

nums = IN[0]
prims = []

for i in nums:
    prims.append(isprime(i))

Actually a lot more functions… how do i access them?

prime(n)
primefactors(z)
primepi(n)
sieve.primerange(n1,n2)

Where are you getting those functions? If you didn’t see them coming from the math library then they probably came from somewhere else. I’ve never seen those functions before.

They are from the sympy module, which you would need to load to be able to use.

Whoops! Wrong code… thanks @timhevel

Some code to that properly finds prime numbers in a list.

1 Like

f.e. OUT = divmod(17,5) works also!

i got these from a math/python book

@Nick_Boyts

1 Like

@Nick_Boyts ,

I am “just” architect, f.e. what does “congruent” mean… the book is realy explaning basics. I understand a little pit better how data got processed. I can better follow and understand warnings and errors.

Google “congruent” (Tip) :slight_smile:

4 Likes

0 to 100 has 25 prime numbers not 52

2 Likes

Yes @timhevel i get the same here :wink:

1 Like

Are these libraries loadable? like SymPy ?
is this similar issue like IronPython and Python3?
is there an instruction anywhere to get them and load them to the correct path on my Computer?

Yes, @solamour has provided detailed instructions on this in the past that links to here.

4 Likes

2022-06-30_13h39_08
is this the right one? because in the link it looks diferent!
i have already Python38 (Scripsfolder i made manually)


wished module: