title: Having trouble with python while loop and dictionary
body: <p>I'm new to python while loop and dictionary.</p>
  
  <p>I want to write a code sample that prompts repeatedly prompts the user for a key followed by a value. The key and value should then be stored in a dictionary. </p>
  
  <p>It should stop prompting the user for keys and values once the user enters the word "Done" as a key followed by "Done" as a value. We may assume that the user will only enter string-type keys and string-type values. We also do not need to worry about duplicate keys.</p>
  
  <p>After the user types "Done" for value and "Done" for key, the code sample should then prompt the user for one lookup key. It will print out the value of that key and finish. </p>
  
  <p>See below for examples...</p>
  
  <p>Example</p>
  
  <blockquote>
    <p>Key: Tu</p>
    
    <p>Value: Tuesday</p>
    
    <p>Key: We</p>
    
    <p>Value: Wednesday</p>
    
    <p>Key: Th</p>
    
    <p>Value: Thursday</p>
    
    <p>Key: Fr</p>
    
    <p>Value: Done</p>
    
    <p>Key: Sa</p>
    
    <p>Value: Saturday</p>
    
    <p>Key: Done</p>
    
    <p>Value: Done</p>
    
    <p>What would you like to look up? Fr</p>
    
    <p>Done</p>
  </blockquote>
  
  <p><strong>My codes (how to fix it?)</strong>:</p>
  
  <pre><code>a = input('Key: ')
  b = input('Value: ')
  dict = {a: b}
  while a != 'Done' and b != 'Done':
          new_dict = {input('Key: '): input('Value: ')}
          dict.update(new_dict)
  key = input('What would you like to look up?')
  print(dict.get(key))
  </code></pre>