Question: What am I doing wrong def compare (seq1, seq2): # Given two DNA sequences. Now, you compare their nucleotide counts. The nucleotide # Count results

 What am I doing wrong def compare (seq1, seq2): # GivenWhat am I doing wrong
two DNA sequences. Now, you compare their nucleotide counts. The nucleotide #

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 seq1 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, you need to create these two string objects by using assignment (). You also need to name two returned dictionaries Then, you need to use one for loop to navigate both dictionaries in the same time and print out the result, as following: 3. Result for compare ): segi is (ATTGCCCC) Seg2 is (ATTCGGGG) A count: Seqi [1] vs Seq2 [1) T count: Seql [2] vs Seq2 [2) G count: SeqI [1] vs seq2 [3] c count: Segl [4] vs Seg2 [1] # The underlined parts are changeable # Other parts must be the same as described n [ , A , , , T . , , G , , 'C" ] and then use the same key (say A') to retrieve values from [Hint: you can use both dictionaries] for x #answer three def compare(seq1, seq2): d1 = {} d2 = {} for c in seq1: if c not in d1: d1 [c] = 0 d1[c] += 1 for c in seq2: ea2 d2 if c not in d2: d2 [c] = 0 d2 [c] return d1,d2 += 1 def main0: seqi "ATTGCCCC" seq2"ATTCGGGG" d1, d2 = compare (seq1, seq2) print("Seqlus ("seq1)" print("Seq2us ("seq2)" for x in ['A', T, G', C1: print(x+" count: Seq1[d] vs Seq2Id]"(d1Ix], d2[x

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!