Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python_one_week_4_biologists_solutions
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hub-courses
python_one_week_4_biologists_solutions
Commits
a57ca700
Commit
a57ca700
authored
4 years ago
by
Blaise Li
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.pasteur.fr:hub-courses/python_one_week_4_biologists_solutions
parents
f9e23dc7
c6c1d48d
No related branches found
No related tags found
No related merge requests found
Pipeline
#58241
passed
4 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/Control_Flow_Statements.rst
+3
-3
3 additions, 3 deletions
source/Control_Flow_Statements.rst
source/_static/code/fibonacci_iteration.py
+2
-2
2 additions, 2 deletions
source/_static/code/fibonacci_iteration.py
with
5 additions
and
5 deletions
source/Control_Flow_Statements.rst
+
3
−
3
View file @
a57ca700
...
@@ -121,7 +121,7 @@ Exercise
...
@@ -121,7 +121,7 @@ Exercise
.. literalinclude:: _static/code/restriction.py
.. literalinclude:: _static/code/restriction.py
:linenos:
:linenos:
:lines: 1
5
-3
1
:lines: 1
8
-3
3
:language: python
:language: python
**pseudocode of second algorithm**
**pseudocode of second algorithm**
...
@@ -138,7 +138,7 @@ Exercise
...
@@ -138,7 +138,7 @@ Exercise
.. literalinclude:: _static/code/restriction.py
.. literalinclude:: _static/code/restriction.py
:linenos:
:linenos:
:lines: 3
2
-5
3
:lines: 3
4
-5
5
:language: python
:language: python
...
@@ -172,7 +172,7 @@ in bonus we can try to sort the list in the order of the position of the binding
...
@@ -172,7 +172,7 @@ in bonus we can try to sort the list in the order of the position of the binding
.. literalinclude:: _static/code/restriction.py
.. literalinclude:: _static/code/restriction.py
:linenos:
:linenos:
:lines: 5
4
-
:lines: 5
5
-
:language: python
:language: python
::
::
...
...
This diff is collapsed.
Click to expand it.
source/_static/code/fibonacci_iteration.py
+
2
−
2
View file @
a57ca700
...
@@ -19,12 +19,12 @@ def fibonacci(n):
...
@@ -19,12 +19,12 @@ def fibonacci(n):
elif
i
==
1
:
elif
i
==
1
:
fib_suite
.
append
(
1
)
fib_suite
.
append
(
1
)
else
:
else
:
res
=
fib_suite
[
i
-
1
]
+
fib_suite
[
i
-
2
]
res
=
fib_suite
[
-
1
]
+
fib_suite
[
-
2
]
fib_suite
.
append
(
res
)
fib_suite
.
append
(
res
)
i
+=
1
i
+=
1
return
fib_suite
return
fib_suite
print
'
,
'
.
join
([
str
(
i
)
for
i
in
fibonacci
(
10
)])
print
(
'
,
'
.
join
([
str
(
i
)
for
i
in
fibonacci
(
10
)])
)
def
fibonacci_2
(
n
):
def
fibonacci_2
(
n
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment