Before you start the assignment you should set up your Python env. and get comfortable with using Jupyter notebooks. Though there are a lot of ways to do this, we reccommend you to do it using the Anaconda distribution.
- Download and install Anaconda's Python 3.7 version on your computers from here. It is available for all 3 platforms - Windows, macOS and Linux.
- It will install Jupyter notebook on your system and download all the Python libraries that you'll need for this assignment.
- To run the notebook, run the following command -
jupyter notebook
at the Terminal(Mac/Linux). For Windows type the same command in the Anaconda Prompt( Anaconda command prompt is just like command prompt,but it makes sure that you are able to use anaconda and conda commands from the prompt, without having to change directories or your path). Type Anaconda Prompt in the search bar or just directly search for Jupyter Notebooks on your system.
-
You should see the notebook open in your browser. Creating a new Jupyter Notebook is easy, just use the "New" dropdown menu and click on "Python 3". Try to experiment and play around with things by yourselves.
-
Something key to be aware of: Jupyter Notebooks have two different keyboard input modes:
- Command mode - binds the keyboard to notebook level actions. Indicated by a grey cell border with a blue left margin.
- Edit mode - when you’re typing in a cell. Indicated by a green cell border.
shift
+enter
run cell, select belowctrl
+enter
run celloption
+enter
run cell, insert belowA
insert cell aboveB
insert cell belowC
copy cellV
paste cellD
+D
(press the key twice) delete selected celloption
+enter
merge selected cells, or current cell with cell below if only one is selected.I + I
interrupt kernelY
change cell to code modeM
change cell to markdown mode (for good documentation)
cmd
+click
for multi-curso editingtab
code completion or indentshift
+tab
show documentationctrl
+shift
+-
split cell
Press cmd
+ shift
+ P
for quick access to all commands in Jupyter notebooks and press H
(in command mode) to viewa all keyboard shortcuts.
- The edit mode is entered if you click into the code area of that cell. This mode is indicated by a green border on the left side of the cell.
- If you’d like to leave edit mode and return to command mode again you just need to hit
ESC
. Enter
will take you from command mode back into edit mode for the given cell.
Open a blank jupyter notebook and using the workshop's notebooks as a reference, write (do not just copy and paste) and run the code in the blank. This will help you to get comfortable with all the data structures and ideas that you'll need for the assignment. Feel free to exploit the internet for your doubts.
In case you have doubts, please write an email to [email protected]!