CODE

#PRIME NUMBERS.PY BY GEORGE SKOUROUPATHIS
givenumber = ""
while True:
    i = 2
    list1 = []
    givenumber = raw_input("Give a number until which you want to find \
    the prime numbers.(type anything else to quit the program): ")
    if givenumber.isdigit() == False:
        break
    else:
        givenumber = int(givenumber)
    while i <= givenumber:
        inlist = 1
        g = 2
        while g <= i/2:
            if i%g == 0:
                inlist = 0
            g += 1
        if inlist == 1:
            list1.append(i)
        i += 1
    print list1
print "Coding by George Skouroupathis"
testword = raw_input("(Press Enter to Quit)")