CSC 15 DNA Lab The target for this lab is to write some procedures for string matching. We will apply these procedures to DNA sequence analysis. Some of the procedures will also involve file I/O. ######### Prelim: Some operations on strings that may be useful: # Given some string s = "abcdefg" # the expression s[a:b] will return the substring of s from # s[a] to to s[b-1], so s[2:5] will return "cde". The length of the substring # is always b-a. The expression s[:3] is the same as s[0:3] and s[3:] is # the same as s[3:len(s)]. For example: s = s[0:2] + 'x' + s[3:] # will change 'c' to 'x', s becomes "abxdefg" # However, for large strings, it would be more efficient to change individual # characters by first converting the string into an array of characters. ######### PART I: 0. Write a procedure that generates a random DNA sequence of length n: def randomDNA(n): Think about the algorithm first: you'll start with an empty string "", then run a loop n times. Inside the loop, you need to generate a randint(0,3) and depending on the value of this random number, you will add either an "A", "C", "G" or "T" to the end of your string. For example, to add the character "C" to the end of string S, use the statement S = S+"C". The function should return the string generated. To use the randint function, put *from random import randint* at the top of your program. Then randint(a,b) generates a random number between a and b inclusively. ####### 1. Write a function count(X,S) that returns the number of times that the character X appears in string S. For example, count("A","GATCAATC") should return 3. Test it on your random DNA sequences. ####### The following procedures may require procedures to transform strings to arrays of chars and vice versa. Transforming a string into an array of chars will make it easier to modify the string, as long as you transform it back into a string at the end. def stringtoarray(S): A = [] i = 0 while i