Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaou committed Oct 27, 2024
1 parent a0d9cf8 commit 8e7568d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
12 changes: 8 additions & 4 deletions WS1/0_python_basics/3_control_flow.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<title>Conditionality and Repetition &#8212; Dig4Bio-workshops</title>
<title>4. Conditionality and Repetition &#8212; Dig4Bio-workshops</title>



Expand Down Expand Up @@ -410,7 +410,7 @@


<div id="jb-print-docs-body" class="onlyprint">
<h1>Conditionality and Repetition</h1>
<h1>4. Conditionality and Repetition</h1>
<!-- Table of contents -->
<div id="print-main-content">
<div id="jb-print-toc">
Expand All @@ -435,12 +435,16 @@ <h2> Contents </h2>
<article class="bd-article">

<section class="tex2jax_ignore mathjax_ignore" id="conditionality-and-repetition">
<h1>Conditionality and Repetition<a class="headerlink" href="#conditionality-and-repetition" title="Link to this heading">#</a></h1>
<h1>4. Conditionality and Repetition<a class="headerlink" href="#conditionality-and-repetition" title="Link to this heading">#</a></h1>
<p>You will quickly find out that in your programming experience, you will spend quite some time writing conditional statements or <em>looping</em> through items. Therefore, it’s very important that you understand what these statements do and how to properly use them.</p>
<section id="conditionality">
<h2>Conditionality<a class="headerlink" href="#conditionality" title="Link to this heading">#</a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">if</span></code> statement is based on a <strong>boolean</strong> operation: if the first condition is executed it means that <em>the condition is</em> <code class="docutils literal notranslate"><span class="pre">True</span></code>, otherwise, the program moves on to the next statements <em>until either a <code class="docutils literal notranslate"><span class="pre">True</span></code> statement or the end of the flow</em> (else, if included). The flow chart below illustrates the conditional process with one if, two elif and one else statements.</p>
<p><img alt="alt text" src="WS1/0_python_basics/images/Python-if-elif-else-statement.png" /></p>
<p><img src="../../media/WS1/Python-if-elif-else-statement.png"
alt="Picture"
width="600"
height="400"
style="display: block; margin: 0 auto" /></p>
<p>Let’s see some examples.</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
Expand Down
9 changes: 7 additions & 2 deletions _sources/WS1/0_python_basics/3_control_flow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "bcfb1a44-abdb-44b6-a59f-90684ce8322a",
"metadata": {},
"source": [
"# Conditionality and Repetition"
"# 4. Conditionality and Repetition"
]
},
{
Expand All @@ -31,7 +31,12 @@
"source": [
"The `if` statement is based on a **boolean** operation: if the first condition is executed it means that *the condition is* `True`, otherwise, the program moves on to the next statements *until either a `True` statement or the end of the flow* (else, if included). The flow chart below illustrates the conditional process with one if, two elif and one else statements.\n",
"\n",
"![alt text](images/Python-if-elif-else-statement.png)"
"\n",
"<img src=\"../../media/WS1/Python-if-elif-else-statement.png\" \n",
" alt=\"Picture\" \n",
" width=\"600\" \n",
" height=\"400\" \n",
" style=\"display: block; margin: 0 auto\" />"
]
},
{
Expand Down
Binary file modified objects.inv
Binary file not shown.
Loading

0 comments on commit 8e7568d

Please sign in to comment.