Fill_in_blank_game. Unable to select level
<p>Whenever I type in one of the level options the console prints</p>

<p>"C-3PO: That entry will not compute sir." and then prmpts again.</p>

<p>So in other words I am unable to select the level of the game. I enter in Padawan for example, which is one of the selections and instead of showing the paragraph with blanks to the code runs the while loop of chosen_level not in choices.</p>

<pre><code>padawan_level = "Luke Skywalker is the son of \n Darth __1__! \n Boba Fett     is the son of __2__ Fett. \nis type in:\n Stormtroopers were previously known as     __3__ troopers\n Yoda was a Jedi __4__ \n"padawan_inputs = ['Darth Vader','Jango','Clone','Master']

jedi_level = "\n Han Solo owed money to Jabba the __1__ \n Princess Leia\'s last name is __2__.\n Han Solo's Ship is called the __3__ Falcon.\n Boba Fett's ship was called the __4__ 1.\n"jedi_inputs = ['Hutt','Organa','Millennium','Slave']

master_level = "Princess Leia's home planet was __1__.\n Darth Vader was born on the planet__2__.\n Senetor Palpatine was also known as Darth __3__.\n Luke Skywalker was raised by his unlce __4__.\n" master_inputs = ['Alderaan','Tatooine','Sidious','Owen']

def select_level():
"""Prompts user for level'"""
    prompt = "Please select a game difficulty by typing it in!\n"
    prompt += "Possible choices include Padawan, Jedi, and Master.\n"
    choices = {x:"Padawan" for x in ("Padawan", '1',)}
    choices.update({y:"Jedi" for y in ("Jedi", '2',)})
    choices.update({z:"Master" for z in ("Master", '3')})
    chosen_level = raw_input(prompt).lower()
    while chosen_level not in choices:
        print "C-3PO: That entry will not compute sir."
        chosen_level = raw_input(prompt).lower()

print "C-3PO: You've selected " + str(choices[chosen_level]) + '!\n'
return choices[chosen_level]


def get_answers(level):
    global padawan_level
    global padawan_inputs
    global jedi_level
    global jedi_inputs
    global master_level
    global master_inputs
    if level == 'Padawan':
        return (padawan_level, padawan_inputs)
    if level == 'Jedi':
        return (jedi_level, jedi_inputs)
    if level == 'Master':
        return (master_level, master_inputs)
    print "C-3PO: Error, try again."
    raise ValueError

def ask_question(blank_game, blank_num, answer, max_try = 3):
    trys_left = max_trys
    to_replace = '__' + str(blank_num) + '__'
    prompt = make_display(blank_game, to_replace, trys_left, max_trys)
    user_guess = raw_input(prompt).lower()
    while user_guess != answer.lower() and trys_left &gt; 1:
        trys_left -= 1
        prompt = make_display(blank_game, to_replace, trys_left, max_trys)
        user_guess = raw_input(prompt).lower()
    if trys_left &gt; 1:
        print '\nCorrect!\n'
        return (blank_game.replace(to_replace, answer), blank_num + 1)
    else:
        return (None, blank_num + 1)


def make_display(current_mode, to_replace, trys_left, max_trys):
    """Returns a string to user."""
    prompt = "\nC-3PO: current data reads as such:\n{}\n\n"
    prompt += "C-3PO: What should be in place of space {}?"
    prompt = prompt.format(current_mode, to_replace)
    if trys_left == max_trys:
        return prompt
    new_prompt = "Incorrect sir...Don't blame me. I'm an interpreter."
    if trys_left &gt; 1:
        new_prompt += "Excuse me sir, but might I inquire as to what's going on? {} trys left!\n"
    else:
        new_prompt += "If I may say so, you only have {} try left!\n"
    return new_prompt.format(trys_left) + prompt


def find_max_guess():
    print "C-3PO: You have 4 guesses per question"
    return 4


def play_game():
    level = select_level()
    blank_game, answers = get_answers(level)
    max_guess = find_max_guess()
    current_blank = 1
    while current_blank &lt;= len(answers):
        blank_game, current_blank = ask_question(blank_game, current_blank, answers[current_blank - 1], max_guess)
        if blank_game is None:
            print "C-3PO: We're doomed."
            return False

    print blank_game + "\nOh, yes, that\'s very good, I like that.\n"
    return True


play_game()
</code></pre>

<p><a href="http://i.stack.imgur.com/P7Ihk.jpg" rel="nofollow">Here is my code.</a></p>

<p>You have a few problems with your code. First <code>padawan_inputs</code>, <code>jedi_inputs</code>, and <code>master_inputs</code> should each be on a new line. Next this segment:</p>

<pre><code>print "C-3PO: You've selected " + str(choices[chosen_level]) + '!\n'
return choices[chosen_level]
</code></pre>

<p>Should probably be indented to be in the <code>select_level</code> function. Also in <code>ask_question</code> you get an error with <code>trys_left = max_trys</code> because <code>max_trys</code> isn't defined, remove the <code>s</code>. Onto your question, right now <code>choices</code> is <code>{'1': 'Padawan', 'Jedi': 'Jedi', '2': 'Jedi', 'Master': 'Master', 'Padawan': 'Padawan', '3': 'Master'}</code> and you check if the users lowercase input is the array:</p>

<pre><code>chosen_level = raw_input(prompt).lower()
while chosen_level not in choices:
    print "C-3PO: That entry will not compute sir."
    chosen_level = raw_input(prompt).lower()
</code></pre>

<p>None of the values in <code>choices</code> are lowercase only. Either remove <code>lower()</code> or fix <code>choices</code> to have valid entry items. When I removed <code>lower()</code> a level was selected.</p>

<pre><code>chosen_level = raw_input(prompt)
</code></pre>

python