Calculate query coverage from BLAST output
One serious bug is that you open results.txt for each line of input.  It's almost always better to open files in a with block.  Then, you won't have to worry about closing your filehandles, even if the code exits abnormally.  The with block would have made your results.txt mistake obvious as well.

Since you want to treat your q_start, q_end, and q_len as numbers, I wouldn't even bother to assign their string representations to a variable.  Just convert them to a float as soon as possible.  Similarly, q_cov should be a float; I would just stringify it at the last moment.  I would also postpone rounding just for the purposes of formatting the output, preferring to preserve precision in q_cov itself.

Put your import statements at the beginning of the program.

import re

with open('file.txt') as input, open('results.txt', 'a') as output:
    for line in input.readlines():
        fields = re.split(r'\t+', line.strip())
        q_start, q_end, q_len = map(float, (fields[0], fields[1], fields[3]))
        q_cov = 100 * (q_end - q_start) / q_len
        print &gt;&gt;output, '\t'.join(fields + [str(round(q_cov, 1))])