Skip to content

Commit

Permalink
Merge pull request #69 from LDSSA/SLU06-flow-control
Browse files Browse the repository at this point in the history
Slu06 flow control
  • Loading branch information
InesPessoa authored Apr 18, 2021
2 parents bfbd3dc + 326ab96 commit e420860
Show file tree
Hide file tree
Showing 29 changed files with 6,900 additions and 0 deletions.
2,215 changes: 2,215 additions & 0 deletions Week 03/SLU06 - Flow Control/Exercise notebook.ipynb

Large diffs are not rendered by default.

551 changes: 551 additions & 0 deletions Week 03/SLU06 - Flow Control/Extra Notebook.ipynb

Large diffs are not rendered by default.

4,016 changes: 4,016 additions & 0 deletions Week 03/SLU06 - Flow Control/Learning notebook.ipynb

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions Week 03/SLU06 - Flow Control/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Small Learning Unit 06 - Flow Control

In this Learning Unit, We'll learn how to control the execution of your code and harnest the power of programming!

<img src="./media/unlimited_power.gif" />

We'll start by reviewing and expanding our knowledge of booleans. These are going to be used next to control which part of your code is executed.

We'll then be (healthly) lazy and tell Python to repeat code without writing the same statement over and over again.

We'll concluded with a new method of building lists.

---
Take the fate of your code into your own hands.
---

# New concepts in this unit
- Comparison operators
- Combining conditions with boolean algebra
- The `if`, `elif` and `else` statements
- `for` and `while` loops
- Nested statements
- Interrupting loops with the `continue` and `break` statements
- List Comprehension
- Dictionary Comprehension (Optional)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week 03/SLU06 - Flow Control/media/deeper.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week 03/SLU06 - Flow Control/media/fun_begins.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week 03/SLU06 - Flow Control/media/if_code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week 03/SLU06 - Flow Control/media/lazy_meme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week 03/SLU06 - Flow Control/media/please_no.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week 03/SLU06 - Flow Control/media/shorter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week 03/SLU06 - Flow Control/media/time_stop.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week 03/SLU06 - Flow Control/media/timer.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Week 03/SLU06 - Flow Control/media/tired.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions Week 03/SLU06 - Flow Control/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
alembic==1.5.8
argon2-cffi==20.1.0
async-generator==1.10
attrs==20.3.0
backcall==0.2.0
bleach==3.3.0
certifi==2020.12.5
cffi==1.14.5
chardet==4.0.0
click==7.1.2
decorator==4.4.2
defusedxml==0.7.1
entrypoints==0.3
fuzzywuzzy==0.18.0
greenlet==1.0.0
idna==2.10
importlib-metadata==3.9.0
ipykernel==5.5.0
ipython==7.22.0
ipython-genutils==0.2.0
ipywidgets==7.6.3
jedi==0.18.0
Jinja2==2.11.3
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.1.12
jupyter-console==6.4.0
jupyter-core==4.7.1
jupyterlab-pygments==0.1.2
jupyterlab-widgets==1.0.0
ldsagrader==0.1.15
Mako==1.1.4
MarkupSafe==1.1.1
mistune==0.8.4
nbclient==0.5.3
nbconvert==6.0.7
nbformat==5.1.2
nbgrader==0.6.1
nest-asyncio==1.5.1
notebook==6.3.0
packaging==20.9
pandocfilters==1.4.3
parso==0.8.1
pexpect==4.8.0
pickleshare==0.7.5
prometheus-client==0.9.0
prompt-toolkit==3.0.18
ptyprocess==0.7.0
pycparser==2.20
Pygments==2.8.1
pyparsing==2.4.7
pyrsistent==0.17.3
python-dateutil==2.8.1
python-editor==1.0.4
pyzmq==22.0.3
qtconsole==5.0.3
QtPy==1.9.0
requests==2.25.1
Send2Trash==1.5.0
six==1.15.0
SQLAlchemy==1.4.3
terminado==0.9.3
testpath==0.4.4
tornado==6.1
traitlets==5.0.5
typing-extensions==3.7.4.3
urllib3==1.26.4
wcwidth==0.2.5
webencodings==0.5.1
widgetsnbextension==3.5.1
zipp==3.4.1
22 changes: 22 additions & 0 deletions Week 03/SLU06 - Flow Control/submit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import requests
import json


def submit(slack_id: str, learning_unit: int) -> None:
'''
Submits the notebook to the grades-collector.
param slack_id like "UTS63FC02"
param learning_unit like 0
'''
data = {
"learning_unit": learning_unit,
"slack_id": slack_id,
"grade": 0,
"metadata": {}
}
response = requests.put(
"https://sub-nb-grades-collector.herokuapp.com/submit",
data=json.dumps(data)
)
print('Success' if response.ok else 'Whoopsie Daisy')

0 comments on commit e420860

Please sign in to comment.