-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from LDSSA/SLU06-flow-control
Slu06 flow control
- Loading branch information
Showing
29 changed files
with
6,900 additions
and
0 deletions.
There are no files selected for viewing
2,215 changes: 2,215 additions & 0 deletions
2,215
Week 03/SLU06 - Flow Control/Exercise notebook.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
4,016 changes: 4,016 additions & 0 deletions
4,016
Week 03/SLU06 - Flow Control/Learning notebook.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
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.
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |