Question: 3. Given an arbitrary DNA sequence stored in a string called sequence, determine and print the base composition of the sequence (i.e. what fraction of

3. Given an arbitrary DNA sequence stored in a string called sequence, determine and print the base composition of the sequence (i.e. what fraction of the sequence consists of each of A, T, C and G). You can assume that all of the characters in sequence are uppercase. You should store your fractions in variables called a_fraction, t_fraction, c_fraction, g_fraction so that the print statements at the end of the cell will work correctly. 

sequence = "ATGGTACCTGTCAACGTCAA"

# your code here

print('A', a_fraction) print('T', t_fraction) print('C', c_fraction) print('G', g_fraction)

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!