title: How do I continue a python program after a while loop exits?
body: <p>I have a python3 program that guesses the last name of an individual based on the input of the user. But I figured out how to break if the user answer now, but when the user says yes it just re-enter the loop again with the same initial question. </p>
  
  <pre><code>while True:
      answer = input('Do you want me to guess your name? yes/no :')
      if answer.lower() == 'no':
          print("Great")
      else:
          time.sleep(2)
          exit('Shame, thank you for playing')
  
  lastname = input('Please tell me the first letter in your surname?').lower()
  time.sleep(2)
  </code></pre>
  
  <p>DEMO - If the user answer 'yes'</p>
  
  <pre><code>Do you want me to guess your name? yes/no :
  Great
  Do you want me to guess your name? yes/no :
  Great
  Do you want me to guess your name? yes/no :
  </code></pre>
  
  <p>etc.</p>
  
  <p>So basically I want the program to exit on no, but continue on yes with the next question which is "Please tell me the first letter in your surname?"</p>
  
  <p>Any idea?</p>
  
  <p>I through after picking up some suggestion here, that I could use a while loop, but as the question stands, I did not get it right.  </p>
  
  <p>Please answer in a not so technical way, as my knowledge of python is very limited, still trying to learn.</p>