Homework 2: Python Basics

  1. Write a python program called print_triples.py. Print out all the numbers from 0 to 100 and print a * next to the numbers which are perfectly divisible by 3.
Output should look some like
0
1
2
3 *
4
5
6 *
  1. Write a replacement for the unix tool word count: wc. The program should print out the number of lines in an input file - store your code in the script wc.py.
  1. Read in the codon table file and print some specific patterns. The file is codon_table_compact.txt and is provided in the homework template you will get when you clone the repository. It is also available codon_table_compact.txt. This file has 3 columns which list the 3 letter codon, the amino acid abbreviation, and the full amino acid name. Your program will be written in the script codon_table_count.py
The report can look something like:
Amino acid X is encoded by Y codons
...
...
===
There are X total amino acids and X codons
There are X AAs which are four-fold or six-fold degenerate
These AAs are:
  X
  Y
  Z