1. Create a new directory called Exercises in your Desktop directory using
2. Change into the Exercises directory using
echo, add a 12-nt DNA sequence to a file called seq.txt (use
>> to redirect output to a file).
4. Identify the reverse of the sequence using
rev <seq.txt (the
< is commonly used to read in an input file).
5. Assign the reversed sequence to a variable.
6. Identify the complement of the reversed sequence (i.e. the reverse complement) using
tr. Print the result to the seq.txt file without overwriting the contents (i.e. use
wc to identify the number of lines, words, and characters in the seq.txt file from exercise 1.
less to examine the contents of seq.txt in the terminal.
wc to identify just the number of lines in the seq.txt file from exercise 1 (google search what
wc option to use).
1. Make a new directory called PythonScripts in the Exercises directory using
2. Open a new document in TextWrangler and save it as favorites.py in the PythonScripts directory.
3. Write a Python script that creates a favorites profile for the user. The script should prompt the user for their name and some of their favorite things to do, such as their favorite place to eat, favorite outdoor spot, favorite hobby, favorit subject, etc. The script should print the profile to the terminal.
4. Determine the default version of Python on your computer using
python --version. Is the default Python 3? If not, how can you invoke Python 3?
5. Run the script from step 3.
Write a bash script that creates a favorites profile for the user (i.e. just like in exercise 3 but using bash instead of Python).
Write a python script that calculates the area of a circle with radius n, where n can be any value. The script should print the result along with a brief description (e.g. “A circle with radius 5 has an area of 78.5.”).
Write a script that prompts the user for two sequences, concatenates them and assigns the value to a new variable, and prints the variable within a user friendly message.
Write a script that prompts the user for a sequence (allow both DNA and RNA sequences) and identifies whether the sequence contains a start codon (ATG or AUG).
Write a script that prompts the user for the width of a gel tray and then determines the number of samples that can be loaded on the gel. Assume there are two possible trays that can accomodate a comb containing either 15 or 30 wells:
Tray 1: 5 cm wide (15 well comb)
Tray 2: 10 cm wide (30 well comb)