title: script that prints smallest and largest number from input
body: <p>I have a problem with this code because it puts &quot;done&quot;(phrase to end the loop) as smallest input</p>
  <pre><code>largest = None
  smallest = None
  NumList = []
  while True:
           value = input(&quot;enter a number:&quot;)
           NumList.append(value)
           if value==&quot;done&quot;:
               break
  try: f = float(num)
  except :
      print(&quot;Invalid input&quot;)
  
  
  print(&quot;Maximum is&quot;,min(NumList))
  print(&quot;Minimum is&quot;,max(NumList))
  </code></pre>