Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hub-courses
python_one_week_4_biologists_solutions
Commits
4f476d4e
Commit
4f476d4e
authored
Mar 09, 2017
by
Bertrand NÉRON
Browse files
fix typos
parent
e793fb48
Changes
2
Hide whitespace changes
Inline
Side-by-side
source/Collection_Data_Types.rst
View file @
4f476d4e
...
...
@@ -49,7 +49,7 @@ Exercise
With mutable object like ``list`` when we mutate the object the state of the object is modified.
But the reference to the object is still unchanged.
So in this ex
e
mple we have two ways to access to the list [1,2] if we modify the state of the list itself.
So in this ex
a
mple we have two ways to access to the list [1,2] if we modify the state of the list itself.
but not the references to this object, then the 2 variables x and y still reference the list containing
[1,2,3,4].
...
...
@@ -314,7 +314,7 @@ pseudo code 2
say O(n2) and O(n6). Of course, we would prefer an algorithm requiring 1/2 · n2 steps to an algorithm requiring 1000 · n2 steps.
When we write that the running time of an algorithm is O(n2), we technically mean that it does not grow faster than a function with a
leading term of c · n2, for some constant c. Formally, a function f(n) is Big-O of function g(n), or O(g(n)), when f(n)
≤
c · g(n) for some
leading term of c · n2, for some constant c. Formally, a function f(n) is Big-O of function g(n), or O(g(n)), when f(n)
<=
c · g(n) for some
constant c and sufficiently large n.
For more on Big-O notation, see A `http://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/Beginner's <Guide to Big-O Notation>`_.
...
...
source/Data_Types.rst
View file @
4f476d4e
...
...
@@ -270,12 +270,12 @@ We want to perform a PCR on sv40, can you give the length and the sequence of th
Write a function which have 3 parameters ``sequence``, ``primer_1`` and ``primer_2``
* *We consider only the cases where primer_1 and primer_2 are present in sequence*
* *to simplify the exercise, the 2 primers can be read directly
i
n the sv40 sequence.*
* *to simplify the exercise, the 2 primers can be read directly
o
n the sv40 sequence.*
test you algorithm with the following primers
| primer_1 : 5' CGGGACTATGGTTGCTGACT 3'
| prim
r
e_2 : 5' TCTTTCCGCCTCAGAAGGTA 3'
| prime
r
_2 : 5' TCTTTCCGCCTCAGAAGGTA 3'
Write the pseudocode before to implement it.
...
...
@@ -312,7 +312,7 @@ reverse the following sequence "TACCTTCTGAGGCGGAAAGA" (don't compute the complem
>>> s = "TACCTTCTGAGGCGGAAAGA"
>>> l = list(s)
# take care reverse() reverse a list in place (the method do a side effect and return None )
# so if you don't have a obect reference on the list you cannot get the reversed list!
# so if you don't have a ob
j
ect reference on the list you cannot get the reversed list!
>>> l.reverse()
>>> print l
>>> ''.join(l)
...
...
@@ -361,7 +361,7 @@ Exercise
Write a function
* which take a sequence as paramter
* which take a sequence as param
e
ter
* compute the GC%
* and return it
* display the results readable for human as a micro report like this:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment