#Sieve.py
#Sieve of Eratosthenes program
def setUpNumbers():
# Use 'eval(input())' to ask the user for the largest number that you should check to see if it is prime.
# Call this number 'limit'
# Set up a list 'numbers' that will store all the integers from 2 up to 'limit'
# Set up a loop that fills 'numbers' with the integers from 2 up to 'limit'. You can use the function 'range()'.
# For example: for k in range(50): would provide values of k from 0 to 49.
# Use the list method 'append()' to add each integer to the list: numbers.append(number)
# After the loop is done, use the 'remove()' function to remove 0 and 1 from the list (2 is the smallest prime).
# Like this: numbers.remove(0).
# return 'numbers' to main()
def runSieve(numbers):
# Set up a second list 'primes' that will store the prime numbers that you identify
# Store the largest number in 'numbers' in the variable 'largest': largest = numbers[-1]
# Start a while loop that will run as long as there are still numbers remaining in 'numbers'
# Take the first number in 'numbers' (the number in position 0), and call it 'num'.
# It is prime, so append it to 'primes'.
# Next set up a while loop that is inside the loop that you started above.
# Remove all the multiples of 'num' from 'numbers'
# You can add a print statement that states "removing multiples of num". The syntax could be:
# print("removing multiples of",num,": ", end="")
# You can add a print statement that prints each number before it is removed from 'numbers'.
# The syntax could be: print(mult," ", end=""), where 'mult' is the number being removed.
# In an IF statement, check that 'mult' is in 'numbers' prior to removing it.
# return 'primes' and 'largest'
def main():
# Call 'setUpNumbers()' and store the list it returns in 'numbers'
# Call runSieve(), sending into it 'numbers' as a parameter. Store the variables it returns in 'primes' and 'largest'.
# Print the prime numbers you have found by printing 'primes'
main()