---
# System prepended metadata

title: Python Ch6-1
tags: [python2021]

---

# Python Ch6-1
###### tags: `python2021`
* 要求 (request)：
    * 格式請依照ex1的標準 (檔名:ex6-1.py, ex6-2.py...，最後將所有檔案壓縮至學號.zip or 學號.7z上傳e3)
    * 輸出檔案內容以TA截圖為標準

# Question 1 : Determining An Integer
Write a program that take an argument from the command line and determine whether the argument is an integer. If it is, print to the screen the absolute value of the number; otherwise, print “Not an integer”.

# Question 2 : Counting Point Mutations
A mutation is simply a mistake that occurs during the creation or copying of a nucleic acid, in particular DNA. The simplest and most common type of nucleic acid mutation is a point mutation, which replaces one base with another at a single nucleotide.

:::info
Given: Two DNA strings seq1 and seq2 of equal length.
Return: The number of point mutation.
:::

Mismatched symbols are colored red.
![](https://i.imgur.com/v2OTQPx.png)

**Input sequence:**
```
seq1= "GAGCCTACTAACGGGAT"
seq2= "CATCGTAATGACGGCCT"
```
**Output:**
![](https://i.imgur.com/X2ley73.jpg)

# Question 3 : Consensus and Profile (Finding a Most Likely Common Ancestor)

:::info
Given: A collection of DNA strings of equal length in FASTA format ***Consensusseq.fa***

Return: A consensus string and profile matrix for the collection. (If several possible consensus strings exist, then you may return any one of them.)
:::

![](https://i.imgur.com/D1cnxAE.png)

**Output:**
![](https://i.imgur.com/YbDug1i.jpg)


