title: In Python, How do I make my input validation keep on looping if the user enters an incorrect value
body: <p>How do I make my code loop back to the input (and checking the values again) if the user inputted a number that is below 0 or higher than 100 or not entering a integer</p>
  
  <pre><code>NameList = []
  Name1List = []
  def Va():
      while True:
          try:
              int(NameMSplit[1])
              if int(NameMSplit[1]) &gt; 0 and int(NameMSplit[1]) &lt; 100:
                  return NameMSplit[1]
              else:
                  print ("Number is not between 0 and 100")
          except ValueError:
               print("Please make sure it's a number ")
  
  #Main Code
  NameMarks = input("Please input your name followed by your marks seperated by spaces ")
  NameMSplit = NameMarks.split()
  V = Va()
  while NameMarks != 'Q':
      Name =(NameMSplit[0])
      Name1 = (NameMSplit[1])
      NameList.append(Name)
      Name1List.append(Name1)
      NameMarks = input("Please input your name followed by your marks seperated by spaces ")
      NameMSplit = NameMarks.split()
  print (Name1List, NameList) 
  </code></pre>