Answer:
Following are the code to the given question:
def match_sequence(s1,s2):#Defining a method match_sequence that accepts two parameters
for l in range(len(s1)):#defining a loop that checks range of s1 value
if(s1[l] != s2[l]): # use if block to match each sequences
print('The sequence does not match at index: ',l+1)#print value with message
s1 = 'CATCGTCCT'#defining a string varible s1
s2 = 'CACCGACCG'#defining a string varible s1
match_sequence(s1,s2)#calling a method that prints its values
Output:
The sequence does not match at index: 3
The sequence does not match at index: 6
The sequence does not match at index: 9
Explanation:
In this code, a method "match_sequence" is declared that takes two string variable "s1 and s2" in its parameters, and inside the method, a loop is declared that checks the range of s1 value and use if block to match each sequence and use a print method that prints it values.
Outside the method, two string variables are declared that holds a string value that passes into the "match_sequence" method and calls it.