- Code: Select all
`def prime(x):`

c=0

y=1

d=0

k=[]

while c<x:

while d%y!=0:

y = y + 1

if d == y:

k = k.append(d)

c = c + 1

d = d + 1

y=2

return k

I'm trying to write the x first prime numbers, where I'm incorrect in this code ?

And... what is the diference between "return" and "print" ? I still don't noticed any difference...