Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started