title: Getting the number of digits of nonnegative integers (Python)
body: <p>The question asks:</p>
  
  <p><em>&lt;&lt; BACKGROUND STORY:
  Suppose we’re designing a point-of-sale and order-tracking system for a new burger
  joint. It is a small joint and it only sells 4 options for combos: Classic Single
  Combo (hamburger with one patty), Classic Double With Cheese Combo (2 patties),
  and Classic Triple with Cheese Combo (3 patties), Avant-Garde Quadruple with
  Guacamole Combo (4 patties). We shall encode these combos as 1, 2, 3, and 4
  respectively. Each meal can be biggie sized to acquire a larger box of fries and
  drink. A biggie sized combo is represented by 5, 6, 7, and 8 respectively, for the
  combos 1, 2, 3, and 4 respectively. >></em></p>
  
  <p>Write an iterative function called order_size which takes an order and returns the number of combos in the order. For example, order_size(237) -> 3.</p>
  
  <p>Whereby I should have</p>
  
  <pre><code>order_size(0) = 0
  
  order_size(6) = 1
  
  order_size(51) = 2
  
  order_size(682) = 3
  </code></pre>
  
  <p>My code is:</p>
  
  <pre><code>def order_size(order):
  
      # Fill in your code here
      if order &gt; 0:
          size = 0
          while order &gt; 0:
              size +=  1
              order = order // 10
              return size
          else:
              return 0
  </code></pre>
  
  <p>But I don't get the order // 10 portion. I'm guessing it's wrong but I can't think of any stuff to substitute that.</p>