Welcome to Phase 2, where we’ll be learning about back end development. Topics we’ll cover include:
- Python and object-oriented programming
- Building web applications with Django
- Working with a relational database
🗓️ Today’s topics
- Running Python
- Syntax differences between JS and Python
- Python
- variables
if
statements
while
loops
- Input and output with
input
and print
- Functions
✅ TODO today
- Make sure your dev environment is set up, using our guide.
- Read Python VS JavaScript – What are the Key Differences Between The Two Popular Programming Languages?
- Read and code along with Al Sweigart’s Automate The Boring Stuff. This is the assignment repository for writing the code. Work on chapters 1-3.
🐍 Code Break
Try working with input and output
🎯 Project
We’ll begin Python the way we began JavaScript, with some exercises and tests you can run to keep you on track. We’re going to use an awesome free online tool called Exercism.
Please sign up using your GitHub account (getting started instructions) and choose the Python track. Make sure that you are in Practice Mode.
If your exercises are locked you need to switch from Learning Mode to Practice Mode. Here’s a short video showing you how to do that.
You can use the in-browser editor, or work through their command line setup walkthrough to install Exercism on your computer.
⚠️ To run the tests locally, you will need a testing library called pytest
installed. To install the necessary dependencies, run the following at the command line (it does not matter what directory you are in when you pip
install something):
pip install pytest pytest-cache
In the Python track, complete the following exercises:
- Hello World
- Two Fer
- Raindrops
And at least 1 of the following, your choice:
- Scrabble Score
- Hamming
- Resistor color
Be sure to read the instructions for each exercise carefully. Here is a guide to running the Python tests on Exercism.
If you get through all four of these, please continue with other exercises that seem interesting or fun to you. There are lots to choose from, and you want as much practice with Python as you can get.
🥡 How to submit your work
When you submit your solution for an exercism, you have the option to publish it. Please publish your solutions for the four exercisms required as specified above. You will then be able to see all your published solutions on your profile page.
You can find your profile page by clicking on your user avatar on Exercism and choosing “Public Profile” from the menu.
To submit your work, paste the URL for your Exercism profile page into this form.
🔖 Resources
Essential Python Resources
RealPython: Basic Python Tutorials
These articles are way more in-depth than you need right now, but they are good references for more information, if you feel you need that.
📓 Jupyter Notebooks
💁 Asking Questions + Getting Help
🦉 Code & Notes