ubuntu2004
Kernel: Python 3 (system-wide)
Exercises 14.1
Loop through the following DNA sequence using range()
and print each base.
In [0]:
In [0]:
Exercises 14.2
Modify your code so that it prints all quintuplets (5 consecutive bases). For example, the first few quintuplets are "ACGGA", "CGGAT", "GGATA", etc.
Hint: This is slightly different to the example in Notebook 14 in which the step size was 3. Here we want a step size of 1.
In [0]:
Exercises 14.3
Modify your code so that it counts all occurrences of the quintuplet "TATAT".
In [0]:
Exercises 14.4
Use range()
to calculate the sum of all the numbers in the following list. Print the sum.
In [0]:
In [0]:
Exercises 14.5
Use range()
to simultaneously loop through the following two lists. Add each pair of numbers and print them.
In [0]:
In [0]: