'''
Author: Luke Hebert
Date begun: March 17th, 2021
Description:
    -takes two strings of equal length and counts the number of differences
    between the two sequences
'''

import sys

in_filename = sys.argv[1]

with open(in_filename, 'r') as in_file:
    sequence1 = in_file.readline()
    sequence2 = in_file.readline()

print('\n\nThe input sequences are: \n' + sequence1 + sequence2)

hamming_distance = 0
for pos1, pos2 in zip(sequence1, sequence2):
    if pos1 != pos2:
        hamming_distance += 1

print('\nThe Hamming distance between these two sequences is: \n' + str(hamming_distance))
