Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions