Exercises and lessons for Niko.
- Make sure you have Python 3.
python3 --version
- Install Python 3 if you don't have it.
brew install python
- Install virtualenv.
pip install virtualenv
- Create a virtualenv for this project. This will allow you to keep all your dependencies up to date and consistent with what is expected. It will also allow you to pip install packages without
sudo
.
virtualenv -p python3.6 ~/virtualenvs/niko-exercises
- Activate the virtualenv.
source ~/virtualenvs/niko-exercises/bin/activate
- Install the requirements for this project. You should do this perioidically to make sure you are up to date.
pip install -r requirements.txt
-
Install Pycharm Community Edition. The IDE has tools that are going to make your life a lot easier and help you catch mistakes before committing to git.
-
Point PyCharm at the correct virtualenv. Go to Settings > Project Settings > Project Interpreter. Click the gear icon next to the dropdown and select Add Local. Navigate to the location of the virtualenv you created in step 4. Select the
bin/python
executable in that directory.
- PEP-8 - best practices for conventional code styling
- Fibonacci Sequence - working with generators
- Sorted Stream - more generators!