-
Notifications
You must be signed in to change notification settings - Fork 11
/
DNA.py
executable file
·14 lines (13 loc) · 1.06 KB
/
DNA.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def DNA(s):
a = c = g = t = 0
for ch in s:
if (ch == 'A'):
a += 1
if (ch == 'C'):
c += 1
if (ch == 'G'):
g += 1
if (ch == 'T'):
t += 1
print a, c, g, t
DNA("GTCGTGGGGAGATTAGAAGGCGGGCGTGGGATCAACAAATTACTGCATTCTGTCAGGCTGGGACTTCACGGGAGGCATTACGAATCTGGTTGCTGAAGCGATGATCAAGTACGCAAAAAGCCGACAAAGGGGGAGTTAACCCGCTGCTAGCTTGATAACTTAGAGCGGGCCTCGGGGATAACCAATTCCTTCGTAAGCGCGGCGGCTGTGCTGTTGTTATAGCCTGACTTGCACTCTGAGGAGACGGTGGCTGCTTACCTAGAATCAATGGGAAGTGATGAGCCAAAACCCGATAGCTGACCTTTTCTTTTACTTCACAACGACGCTTTCAACGGTTCTGTAATGTTCAGCCCGCCTCTGGAGAAGATTTGTGGTCCTTTGTAGCGTCGTATGTAGCCTTTACGATCAGCTACCCGGGGCCGGGCAGACAAAAAGCTGCTTATGTGTTTACCTTGCTAAAGTAAGTCCCCTAGCTAAACGTTACTAACTTCGCATGTGGGTGGTGCCCAATCGCTTGGCTTACTTTATCCTTTTCCCGCTACGTCAGCCAAGATGCATTATTCAAGCCGATACCTACTTCGCGGAAACGTTGCCTCCAATACCTTGTTAGAGTTATGGCTAGTGCCCCTCCCCCAGCTTCGACTGCGGAAACAGCCGGTTCAAGCCGTTAATTCTCAATTGACAGCGGGACGGTAGTGCGGACGCCTTCAGTGGAGATCTATTAGAGACACGACTTATACTCTAATCCAGATCGTTACACCAGCTGGAGTGGACTAGTAGTCATCACTAGCTGAGAGCCCTACTTGGGCTACTGGCATTCTAAACCAGCGCAGCGGTTAACAATGCGCGGAAAGGAGACG")