title: How should I break the loop in this problem?
body: <p>The problem:</p>
  <p>We have to create a game, where a user inputs the number of pencils they want to use.
  Expand your program by creating a loop. Each player takes turns removing pencils until 0 pencils remain on the table. Each iteration prints 2 lines: lines with pencils (vertical bars) and whose turn is now by printing the <em>NameX</em>'s turn substring.</p>
  <pre><code>
  How many pencils would you like to use:
  &gt; 5
  Who will be the first (John, Jack):
  &gt; John
  |||||
  John's turn:
  &gt; 2
  |||
  Jack's turn:
  &gt; 1
  ||
  John's turn:
  &gt; 2
  </code></pre>
  <p><strong>My solution:</strong></p>
  <pre><code>person = input(&quot;Who will be the first (John, Jack):&quot;)
  print(&quot;|&quot; * number_of_pencil)
  print(f&quot;{person}'s turn&quot;)
  
  while number_of_pencil &gt; 1:
      pencil = int(input())
      number_of_pencil -= pencil
      print(&quot;|&quot; * number_of_pencil)
      if person == &quot;John&quot;:
          print(&quot;Jack's turn&quot;)
          person = &quot;Jack&quot;
      else:
          print(&quot;John's turn&quot;)
          person = &quot;John&quot;
  </code></pre>
  <p><strong>The output:</strong></p>
  <pre><code>Who will be the first (John, Jack):&gt; John
  |||||
  John's turn
  &gt; 2
  |||
  Jack's turn
  &gt; 1
  ||
  John's turn
  &gt; 2
  
  Jack's turn
  
  </code></pre>
  <p><strong>Suggestion required:</strong> How should I break the loop?</p>