title: Passing a file as a function argument
body: <p>If I have a text file (<code>sequencedata.txt</code>) in a directory named documents:</p>
  
  <pre><code>/~/documents/sequencedata.txt
  </code></pre>
  
  <p>How would I define a function named <code>sequenceinfo</code> that would count the number of entries that start with <code>#</code> in the file of above pathway and return this count with the syntax <code>"there are * entries"</code>, in which the <code>*</code> is the counted number of entries?</p>
  
  <p>What I have so far:</p>
  
  <pre><code>#!/usr/bin/python
  def sequenceinfo(sequencedata):
      my_file = open("/~/documents/sequencedata.txt")
      my_dna = my_file.read()
      ecoliseq = my_dna.count('#')
      return ecoliseq
  
  print("There are " + str(ecoliseq) + " sequences")
  </code></pre>