Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasero committed Sep 17, 2024
1 parent d6df987 commit 7600998
Show file tree
Hide file tree
Showing 34 changed files with 892 additions and 85 deletions.
206 changes: 161 additions & 45 deletions _sources/chapters/module-2/025-conditional.ipynb

Large diffs are not rendered by default.

82 changes: 82 additions & 0 deletions _sources/chapters/module-2/In-class-activity-Control.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "a113c941-6d6e-4b92-a4ad-f14bbab59828",
"metadata": {},
"source": [
"4 - What prints in the above `if`, `elif` example if val = 5? "
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "7e53291d-5337-4e8c-b16f-5668d934a678",
"metadata": {},
"outputs": [],
"source": [
"val = 5\n",
"\n",
"if -10 < val < -5:\n",
" print('bucket 1')\n",
"if -5 <= val < -2:\n",
" print('bucket 2')\n",
"elif val == -2:\n",
" print('bucket 3')"
]
},
{
"cell_type": "markdown",
"id": "9e6e97b3-f7c3-4018-aaa1-b1208d41063b",
"metadata": {},
"source": [
"1 - Write a statement that evaluates if a number is a number is divisble by 2, divisble by 3, or divisble by both numbers. If there is a number that is not divisable by either number, make sure to include a statement for that case. *Test the numbers: 4, 6, 9, 13"
]
},
{
"cell_type": "markdown",
"id": "216bdc5c-f5ad-4d84-bec7-d4cf2bfc5349",
"metadata": {},
"source": [
"2- Write a piece of code that does the following:\n",
"\n",
"- First, it sets a variable `it` to 0\n",
"- Then, it sets a variable `max_iter` to 100\n",
"- After that, it does the following while `it` < `max_iter`:\n",
" - If `it` is equal to 0 or `it` is divisible by 10, print `it`. hint: use modulo operator %\n",
" - It increases `it` by 1\n",
"\n",
"How many iterations did this loop run?"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5c1e6c85-6f1e-4037-9286-e7a1bd091200",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
1 change: 1 addition & 0 deletions chapters/01-getting_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="module-2/022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="module-2/023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="module-2/024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="module-2/025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/02-python-basics.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="module-2/022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="module-2/023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="module-2/024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="module-2/025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/04-python-basics.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="module-2/022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="module-2/023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="module-2/024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="module-2/025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/module-1/012-intro_python (copia).html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="../module-2/022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/module-1/012-intro_python.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="../module-2/022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/module-1/013-intro_R.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="../module-2/022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/module-1/Practice.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="../module-2/022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/module-1/about_course.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="../module-2/022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/module-1/jupyter_notebooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="../module-2/022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/module-1/programming.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="../module-2/022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/module-1/tech_stack.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="../module-2/022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/module-1/your_first_program.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="../module-2/022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="../module-2/025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/module-2/02-cover.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/module-2/021-variables.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
1 change: 1 addition & 0 deletions chapters/module-2/022-operators.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
5 changes: 3 additions & 2 deletions chapters/module-2/023-strings.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
<link rel="stylesheet" type="text/css" href="../../_static/styles/sphinx-book-theme.css?v=384b581d" />
<link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css?v=be8a1c11" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="../../_static/exercise.css?v=20b57f81" />
<link rel="stylesheet" type="text/css" href="../../_static/exercise.css" />
<link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />

<!-- Pre-loaded scripts that we'll load fully later -->
Expand Down Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
15 changes: 13 additions & 2 deletions chapters/module-2/024-structures.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
<link rel="stylesheet" type="text/css" href="../../_static/styles/sphinx-book-theme.css?v=384b581d" />
<link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css?v=13237357" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css?v=be8a1c11" />
<link rel="stylesheet" type="text/css" href="../../_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
<link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css?v=4fa983c6" />
<link rel="stylesheet" type="text/css" href="../../_static/exercise.css?v=20b57f81" />
<link rel="stylesheet" type="text/css" href="../../_static/exercise.css" />
<link rel="stylesheet" type="text/css" href="../../_static/design-style.1e8bd061cd6da7fc9cf755528e8ffc24.min.css?v=0a3b3ea7" />

<!-- Pre-loaded scripts that we'll load fully later -->
Expand All @@ -61,6 +61,7 @@
<script>DOCUMENTATION_OPTIONS.pagename = 'chapters/module-2/024-structures';</script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Control Structures" href="025-conditional.html" />
<link rel="prev" title="Strings" href="023-strings.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
Expand Down Expand Up @@ -193,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="023-strings.html">Strings</a></li>
<li class="toctree-l1 current active"><a class="current reference internal" href="#">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down Expand Up @@ -1522,6 +1524,15 @@ <h3>Practice exercise<a class="headerlink" href="#id5" title="Link to this headi
<p class="prev-next-title">Strings</p>
</div>
</a>
<a class="right-next"
href="025-conditional.html"
title="next page">
<div class="prev-next-info">
<p class="prev-next-subtitle">next</p>
<p class="prev-next-title">Control Structures</p>
</div>
<i class="fa-solid fa-angle-right"></i>
</a>
</div>
</footer>

Expand Down
1 change: 1 addition & 0 deletions chapters/module-2/0241-structures_exercises.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<li class="toctree-l1"><a class="reference internal" href="022-operators.html">Operators and Expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="023-strings.html">Strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="024-structures.html">Data Structures</a></li>
<li class="toctree-l1"><a class="reference internal" href="025-conditional.html">Control Structures</a></li>
</ul>

</div>
Expand Down
Loading

0 comments on commit 7600998

Please sign in to comment.