title: Find Min and Max from Text File - Python
body: <p>I need to find the minimum and max value from this list of data. I can get the maximum but the minimum. The text file has a lot of data so I decided to upload it here: <a href="https://www.dropbox.com/s/u5ov5zij9v5fumt/project05.data.txt?dl=0" rel="nofollow">https://www.dropbox.com/s/u5ov5zij9v5fumt/project05.data.txt?dl=0</a></p>
  
  <p>Input </p>
  
  <pre><code>try:
      file_name = input("Enter the name of an input file ")
      input_file = open( file_name, "r" )
      header=input_file.readline()
      count=0
      total=0  
      largest_num=0
      smallest_num=0
      michigan=""
      for line in input_file:
          output=float(line[67:71].rstrip())
  
          total += output
          count +=1
          if largest_num&lt;= output:
              largest_num = output
  
          if smallest_num &gt;= output:
              smallest_num = output
  
          if line[0:17].rstrip() == "Michigan":
              state=(line[0:17])
              number=(line[67:75])
      print("\nState with the smallest MMR vaccation rate:")
      print("   with a rate of")
      print("\n State with largest MMR vaccination rate:" )
      print("   with a rate of")
  
      print("\nThe calculated average vaccination rate is",round(total/count,1))
      print("")
      print("Michigan MMR vaccination rate is", number)
      input_file.close()
      except FileNotFoundError:
          print("Error: file not found")
          file_name = input("Enter the name of an input file ")
          input_file = open( file_name, "r" )
  </code></pre>