Question: def compare (seq1, seq2): # Given two DNA sequences. Now, you compare their nucleotide counts. The nucleotide # count results will need to save into
def compare (seq1, seq2): # Given two DNA sequences. Now, you compare their nucleotide counts. The nucleotide # count results will need to save into a dictionary. Therefore, you will generate two # dictionaries (d1 for seq 1 and d2 for seq2). return d1, d2 In the main part of your python script, you need to call this function once by using two named string objects. Of course, ate these two string objects by using assignment (). You also need to name two returned dictionaries. time and print out the result, as following: Then, you need to use one for loop to navigate both dictionaries in the same 3. Result for compare (): Segl is (ATTGCCCC Seq2 is (ATTCGGGG) A count: Seql (1] vs Seq2 [1] T count: Seql [2] vs Seq2 (2) G count: SeqI [1] vs seq2 [3] # The underlined parts are cha c count: Seq1 [4] vs Seq2 [1] # Other parts must be the same as described Hint: you can use for x in ['A', 'T','G'C'] and then use the same key (say'A') to retrieve values from both dictionaries)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
