# Python Exercise 2 - 2021/02/26 ###### tags: `python2021` * 繳交格式: * 以學號命名的zip壓縮檔 ![](https://i.imgur.com/3N5uig4.png) * 程式作業 (1~4) 取名為:ex2-1.py, ex2-2.py, ex2-3.py......,不符合者視為缺交。 --- # Exercise 2-1: Splicing out introns Here's a short section of genomic DNA: ```python ATCGATCGATCGATCGACTGACTAGTCATAGCTATGCATGTAGCTACTCGATCGATCGATCGATCGATCGATCGATCGATCGATCATGCTATCATCGATCGATATCGATGCATCGACTACTAT ``` It comprises two exons and an intron. The first exon runs from the start of the sequence to base number 63 **(starts counting from 1; including base number 63)**, and the second exon runs from base 91 **(also starts counting from 1; including base number 91)** to the end of the sequence. Write a program that will print just the coding regions of the DNA sequence. :::success Hint: Only exon is coding region. ::: --- # Exercise 2-2: Splicing out introns Use the DNA sequence from Exercise 2-1, write a program that will calculate what percentage of the DNA sequence has been coded. --- # Exercise 2-3: Splicing out introns Use the DNA sequence from Exercise 2-1, write a program that will print out the original genomic DNA sequence with coding bases in uppercase and non-coding bases in lowercase. --- # Exercise 2-4 Use the DNA sequence from Exercise 2-1, we want to look for how many "ATGC" sequences appear in it, and their location. Please print all the locations they appear.