This is a lab exercise that involves using loops and strings.
is_dna(seq)
that returns
True if seq
is a string containing only characters from
the DNA set and False otherwise. Your function should do no input
and no printing.transcription(seq)
that
takes a DNA sequence as input and returns an RNA transcription. An
RNA transcription is the same as the original sequence, except that
every T (thymine) in the DNA sequence is replaced with U (uracil).
Do this by accumulating a new string as we saw yesterday.
Your function should do no input or printing. It should return the
newly constructed transcription string.countbases(dna)
that counts
the number of appearances of each of the four bases in a given
string of DNA (not RNA). This function should print its results in
a readable way, labeling all four nucleotides and their
count.main()
function should ask the user for a DNA
sequence. If what the user enters is a valid DNA sequence (as
determined by your is_dna
function) you should print
out the transcription of that sequence, then print out the base
counts, with both of these calculated using the above
functions.