Prime code not working
<p>I am trying to learn some code, and found python. I'm only a beginner but intrested in a programming language.</p>

<p>I have some trouble writing my first program. I am trying to make a program that ask the user for a number, then checks if the number is a prime number, if it is, it will add it to the prime number list.</p>

<p>here is my code.</p>

<pre><code>prime = [2,3,5,7]
get = int(input("what number do you want to check ? "))

a = 0
while a &lt; len(prime):
        print("Test " + str(a+1))
        test = (get / prime[a])
        if isinstance(test, int):
            print(str(get) + " is not a prime number" )
            break
        else:
            a += 1

else:
    prime.extend(get)
    print(str(get) + " is a prime number, prime number added to list"
</code></pre>

<pre><code>prime.extend(get)
</code></pre>

<p><code>extend</code> is used to add a list to a list. If you only want to add a single value, use <code>append</code>.</p>

<pre><code>prime.append(get)
</code></pre>

python primes