title: How can i calculate the percentage of a number greater or equal to a certain number from a file
body: <p>I have a CSV file separated by commas. I need to read the file, determine which lines contain a number that needs to be higher than a given number (say 711), and calculate the percentage of those numbers that fit the criteria.</p>
  
  <p>My code so far is as follows:</p>
  
  <pre><code>myfile = open('3517315a.csv','r')
  
  myfilecount = 0
  
  linecount = 0
  
  firstline = True
  
  for line in myfile:
      if firstline:
          firstline = False
          continue
  fields = line.split(',')
  
      linecount += 1
      count = int(fields[0])
      colour = str(fields[1])
      channels = int(fields[2])
      code = str(fields[3])
      correct = str(fields[4])
      reading = float(fields[5])
  
  print( 'percentage of numbers greater than or equal to 711 is %d:')
  </code></pre>
  
  <p>I do not know how I can set the condition and then calculate the percentage.</p>