title: Using a dictionary with a while-loop
body: <p>Im trying to use a dictionary key in the while-loops condition statement, the program won't recognize any input as 'correct'</p>
  
  <pre><code>class Gymnast_room(KeyCode):    
      def enter(self):
          print "This is the gymnastics room, we got foam pits and rings!"
          print "Before you can enter, you have to enter the code"
          guess = int(raw_input('What is the code? &gt;&gt;'))
  
          passcodes = {'Gymnast_code': 1234,
          'Powerlifting_code': 1234
          }
          while guess != passcodes['Gymnast_code']:
              guess = int(raw_input('What is the code? &gt;&gt;'))
              if guess == passcodes['Gymnast_code']:
                  print "Correct!"
                  return Powerlifting_room()
              else:
                  print "Incorrect!"
  </code></pre>