From 72f48d01e793410c9fb40046235d5d60f21b3e8b Mon Sep 17 00:00:00 2001
From: Blaise Li <blaise.li__git@nsup.org>
Date: Tue, 14 Jun 2022 13:23:45 +0200
Subject: [PATCH] Typos.

---
 source/Collection_Data_Types.rst | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/source/Collection_Data_Types.rst b/source/Collection_Data_Types.rst
index 26ad758..def15ef 100644
--- a/source/Collection_Data_Types.rst
+++ b/source/Collection_Data_Types.rst
@@ -103,7 +103,7 @@ Exercise
 .. note::
    ``sum`` is a function that returns the sum of all the elements of a list.
 
-Wihout using the Python shell, tell what are the effects of the following statements::
+Without using the Python shell, tell what are the effects of the following statements::
 
 
    x = [1, 2, 3, 4]
@@ -175,7 +175,7 @@ Draw the representation in memory of the ``x`` and ``y`` variables when the foll
 Exercise
 --------
 
-from the list l = [1, 2, 3, 4, 5, 6, 7, 8, 9] generate 2 lists l1 containing all odd values, and l2 all even values.::
+From the list l = [1, 2, 3, 4, 5, 6, 7, 8, 9] generate 2 lists l1 containing all odd values, and l2 all even values.::
 
    l = [1, 2, 3, 4, 5, 6, 7, 8, 9]
    l1 = l[::2]
@@ -224,7 +224,7 @@ first implementation:
 second implementation:
 """"""""""""""""""""""
 
-Mathematically speaking the generation of all codons can be the cartesian product
+Mathematically speaking the generation of all codons can be the Cartesian product
 between 3 vectors 'acgt'.
 In python there is a function to do that in ``itertools module``: `https://docs.python.org/3/library/itertools.html#itertools.product <product>`_
 
@@ -361,7 +361,7 @@ In the first algorithm.
 | So the algorithm is in O(sequence length)
 
 
-Compute the 6 mers occurences of the sequence above, and print each 6mer and it's occurence one per line.
+Compute the 6 mers occurrences of the sequence above, and print each 6mer and it's occurrence one per line.
 
 .. literalinclude:: _static/code/kmer.py
    :linenos:
@@ -394,7 +394,7 @@ Compute the 6 mers occurences of the sequence above, and print each 6mer and it'
 bonus:
 """"""
 
-Print the kmers by ordered by occurences.
+Print the kmers by ordered by occurrences.
 
 | see `https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types <sort>`_
 | see `https://docs.python.org/3/library/operator.html#operator.itemgetter <operator.itemgetter>`_
@@ -463,12 +463,12 @@ other solution
 """"""""""""""
 
 python provide an interesting method for our problem.
-The ``translate`` method work on string and need a parameter which is a object
-that can do the correspondance between characters in old string a the new one.
+The ``translate`` method works on a string and needs a parameter which is an object
+that can do the correspondence between characters in the old string and the new one.
 ``maketrans`` is a function in module ``string`` that allow us to build this object.
 ``maketrans`` take 2 arguments, two strings, the first string contains the characters
 to change, the second string the corresponding characters in the new string.
-Thus the two strings **must** have the same length. The correspondance between
+Thus the two strings **must** have the same length. The correspondence between
 the characters to change and their new values is made in function of their position.
 the first character of the first string will be replaced by the first character of the second string,
 the second character of the first string will be replaced by the second character of the second string, on so on.
@@ -555,13 +555,13 @@ with this algorithm we find if an enzyme cut the dna but we cannot find all cuts
    for enz in enzymes:
       print enz.name, dna_1.count(enz.sequence)
 
-the latter algorithm display the number of occurrence of each enzyme, But we cannot determine the position of every sites.
+The latter algorithm displays the number of occurrence of each enzyme, But we cannot determine the position of every sites.
 We will see how to do this later.
 
 Bonus
 ^^^^^
 
-There is another kind of tuple which allow to access to itmes by index or name.
+There is another kind of tuple which allows to access to items by index or name.
 This data collection is called NamedTuple. The NamedTuple are not accessible directly they are in `collections` package,
 so we have to import it before to use it.
 We also have to define which name correspond to which item::
@@ -596,7 +596,7 @@ given the following dict : ::
 
    d = {1 : 'a', 2 : 'b', 3 : 'c' , 4 : 'd'}
 
-We want obtain a new dict with the keys and the values inverted so we will obtain: ::
+We want to obtain a new dict with the keys and the values inverted so we will obtain: ::
 
    inverted_d  {'a': 1, 'c': 3, 'b': 2, 'd': 4}
 
-- 
GitLab