This exercise serves as an introduction to sequence manipulation with Python.

For this we will use the online Python interpreter offered by EduBlocks.

Python is one of the most used programming languages in bioinformatics and one of the most used languages overall.

Your task is to create a Python script that accepts a sequence as a string and prints this sequence, the complement sequence and the reverse complement sequence.

In order to solve this, you have to know some basics of Python syntax:

input strings variable assignment The print function The “if” statement The “for” loop slicing

For example, if we feed your script the sequence “GATT”, it should produce the output below.

GATT CTAA TGTA

Point you browser to https://app.edublocks.org/

create and account if you don’t have one

Create a new Python 3 project, call it “reverse complement” aand select the “Text only” option and click “Create”:

Add your code in the large window as in the example. Click on “Run” and you will see your output in the smaller window to the right.