title: I am trying to make a program that calculates the average, maximum, and minimum? Python
body: <p>I have figured out how to make it find the maximum and minimum but I cannot figure out the average. Any help will be greatly appreciated.</p>
  
  <pre><code>minimum=None
  maximum=None
  
  while True:
      inp= raw_input("Enter a number:")
      if inp == 'done':
          #you must type done to stop taking your list
          break
  
      try:
          num=float(inp)
      except:
          print 'Invalid input'
          continue
  
      if minimum is None or num&lt;minimum:
          minimum = num
  
      if maximum is None or num&gt;maximum:
          maximum = num
  
  print "Maximum:", maximum
  print "Minimum:", minimum
  </code></pre>