Question: The following corresponds to python programming, will upvote, thx. 1) Python string is immutable. You cannot change an existing string. The only way is to
The following corresponds to python programming, will upvote, thx.
1) Python string is immutable. You cannot change an existing string. The only way is to make a new string. However, we need to change some letters in a sequence, for example, to simulate mutations. Write a function simulating mutation. It receives a sequences, a mutation position, and a base letter to replace the existing base. This function returns a new string containing the mutated sequence.
a) WRITE AND INCLUDE THE COMPLETED CODE AS INDICATED BELOW.

# Complete the following function. # DO NOT CHANGE THE FUNCTION NAME AND ARGUMENTS!!! # Hint: You cannot change an existing string. Therefore, you must make # a new string that contain the mutation, and return this new string. def mutate_seq (seq, pos, base) # The following code is provided for your test. # You can modify it as you want, to test your function. seq = 'AAGCCTTGTTC' mutated_seq mutate_seq(seq, 4, 'A') print(sq) print(mutated_seq)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
