title: Python Positioning correctly in a while loop
body: <p>My current code works but when the option menu appears, and i select an option, its supposed to repeat from the selection again, however my code restarts from the start where it asks to enter a number rather than entering an option.</p>
  
  <pre><code>n = 0
  amount = 0
  total = 0
  
  while n != "":
      try:
          n=int(input("Enter a number: "))
          amount = amount+1
          total = total + n
      except ValueError:
          average = total/amount
  
  
          print()
          print("Which option would you like?")
          print("1 - Number of values entered")
          print("2 - Total of the values entered")
          print("3 - Average of values entered")
          print("0 - Exit")
  
          choice = int(input("Enter your choice: "))
          if choice == 1:
              print(amount, "numbers were input.")
  
  
          elif choice == 2:
              print("The total of the sequence is", total)
  
          elif choice == 3:
              print("The average is",average)
  
          elif choice == 0:
              print("Exit")
              break
  </code></pre>
  
  <p>So it means that I need to reposition my code within the while loop, or take the input stage to a different position?</p>