Question: Exercise 1: Counting DNA Nucleotides Compose a function dna_count which accepts a DNA string dna and returns a list or tuple of four integers representing

 Exercise 1: Counting DNA Nucleotides Compose a function dna_count which accepts

Exercise 1: Counting DNA Nucleotides Compose a function dna_count which accepts a DNA string dna and returns a list or tuple of four integers representing the number of times that the symbols A, C, G , and occur in dna. #grade def dna_count(dna): dna = dna.upper() count_A = dna.count('A') return count_A, count_C, count_G, count_T # Here are some DNA strings you can test your function with. dna = TGCA' dna@_answer = (1,1,1,1) dna1 = 'TTTGTCTAGTGGGCGACTCGCCCAATAGACAACGGTTT' dna1_answer = (8,9,10,11) dna2 = 'AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC' dna2_answer = (20,12,17,21) assert dna_count(dnao) == dnao_answer, "Test case dnao failed

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!