I'm trying to get make a program that will print all the prime numbers within the argument I pass to it, so far I've made python respond with a True or False if it is prime or not.
prime = []
prime_list = []
def check_prime(user_input):
for x in range(2, user_input):
if float(user_input) % x > 0:
prime = True
else:
prime = False
break
print prime
check_prime(int(raw_input("get prime numbers up to: ")))
Here is the program where it successfully returns if the number is prime or not(I think)
What I am trying to do is get all the prime numbers and store them into a list, then print them all out when it's finished. I've been picking away at this program for at least a week and I just can't figure it out.
Please pointers only, no finished version.