DSCI 511: Python

DSCI 512: RNA-seq

Questions?

ASSIGNMENT 1

Due date: 9/25/18 by 10 am

Note: complete all of the exercises in one .py file (named assignment1_your_last_name.py) and comment out all but the one exercise you are testing as you complete the assignment. Paste the contents of the file into the text entry box on Canvas for grading. See here for example.

Exercise 1

Prompt the user for two DNA sequences (two separate prompts), concatenate them, and print the concatenated sequence to the terminal with an informative message (e.g. Concatenated sequence: ACTGCA).

Exercise 2

Prompt the user for the height (h) and radius (r) of a beaker and print the volume (v) (v = 3.14*h*r^2).

Exercise 3

Prompt the user for a codon sequence (3-nt DNA sequence) and test if the codon is a start codon and print the result to the terminal.

Exercise 4

Prompt the user to enter a sequence and its complement and print the sequences to the terminal on separate lines with bars between the base paired nucleoditeds as shown below:ACTGAAA|||||||TGACTTT