title: How to use the try-except command in a while loop asking for user input
body: <p>I'm a Python beginner and tried to use <code>try</code> and <code>except</code> for the first time. I'm asking the user for an integer value but instead of ending the program if the user enters for example a string, I would like to ask the user again and again until an integer is given.</p>
  
  <p>At the moment the user is only asked once to give another answer if he gives a string but if he gives a wrong input again, the program stops.</p>
  
  <p>Below an example of what I mean.</p>
  
  <p>I had a look through similar questions on Stackoverflow but I couldn't fix it with any of the suggestions. </p>
  
  <pre><code>travel_score = 0
  
  while True:
      try:
          travel_score = int(input("How many times per year do you travel? Please give an integer number"))
      except ValueError:
          travel_score = int(input("This was not a valid input please try again"))
  
  
  print ("User travels per year:", travel_score)
  </code></pre>