title: Stumped on Exercise 5.2
body: <p>Trying to learn Python.  Been at this one for hours.</p>
  
  <p>What I am trying to do is to enter a few numbers (for example 7, 4, 6, 10, &amp; 2) and then print the maximum and minimum.
   My code works perfectly for every number I enter that is 1-9. Once I hit 10 or higher it goes wonky.
  It appears that it is reading 10 as a 1 with a zero attached to it and it says 10 is the minimum.
  Where am I going wrong here?
  .
  The exercise is to enter a few numbers and then print the maximum and minimum. My code works perfectly for every number I enter that is 1-9. Once I hit 10 or higher it goes wonky and lists 10 as the minimum.
    Where am I going wrong here?
  .</p>
  
  <pre><code>largest = None
  smallest = None
  the_list = []
  
  while True:
      num = input('Enter a number or done: ')
  
      #Handle the edge cases
      if num == 'done' : break
      if len(num) &lt; 1 : break # Check for empty line
  
      # Do the work
      try :
          number = int(num)
          the_list.append(num)
      except:
          print("Invalid input")
          #continue
  
  print(the_list) # NOTE: This is new so I can see what is in the_list
  
  for value in the_list:
      if smallest is None:
          smallest = value
      elif value &lt; smallest:
          smallest = value
  
  for the_num in the_list:
      if largest is None:
          largest = value
      elif the_num &gt; largest:
          largest = value #the_num
  
  print("Maximum is", largest)
  print( "Minimum is", smallest)
  </code></pre>