title: How to restrict useer input with a yes or no question python
body: <p><em><strong>I have am making a game in which it asks a user to answer a question. The question is a yes or no question:</strong></em></p>
  <pre><code>print(&quot;Lying on the ground next to you is a stone slab.&quot;)
  pick = input(&quot;Do you pick up the slab? Yes/No &quot;)
  print(&quot; &quot;)
  if pick==&quot;yes&quot;:
      print(&quot;You pick up the slab and begin reading.&quot;)
  elif pick==&quot;no&quot;:
      print(&quot;You walk forwards and land facefirst onto the slab.&quot;)
  elif pick==&quot;Yes&quot;:
      print(&quot;You pick up the slab and begin reading.&quot;)
  elif pick==&quot;No&quot;:
    print(&quot;You walk forwards and fall facefirst onto the slab&quot;)
  print(&quot; &quot;)
  </code></pre>
  <p><em><strong>I have this but I need to make it so that the user cant input anything other than yes or no.</strong></em></p>