def get_answer():
    '''Receives selection.

    Gets an answer.
    Handles errors.
    Returns answer.'''
    while True:
        try:
            answer = int(raw_input('Please make a selection: '))
            if answer is 1 or answer is 2 or answer is 3 or answer is 4:
                print
                return answer
        except:
            pass
        print 'You must enter 1, 2, 3, or 4 as a selection.'
Receives selection.

    Gets an answer.
    Handles errors.
    Returns answer.
recipes/Python/456374_Crypt/recipe-456374.py