๐ Welcome to Python! ๐
Posted on Jun 7th, 2021
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
statementswhile
loops- Input and output with
input
andprint
- Functions
โ TODO today
- Make sure your dev environment is set up, using our guide.
- Complete the first part of this Python tutorial, through the โFunctionsโ section.
- Configure VS Code to use LiveShare. Test it out with a buddy to make sure it is working.
๐ 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. There are two ways to use Exercism, in Practice Mode or Mentor Mode. Either one is fine for our purposes, but Practice Mode is less setup.
Work through their command line setup walkthrough to install Exercism on your computer.
To run the tests, you will need a testing library called pytest
installed. Run:
pip install pytest pytest-cache
In the Python track, complete the following exercises:
- Hello World
- Two Fer
- Raindrops
- Scrabble Score
Be sure to read the instructions for each exercise carefully. Here is a guide to running the Python tests on Exercism.
For each exercise, follow the instructions on Exercism to upload your solution. You will then need to mark it as complete. At that point you will be given the option to publish it. You must publish your solution in order to submit your homework.
To submit your homework, paste your solution urls into this form.
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!
๐ Resources
Python
- Beginner Tips for Learning Python
- A Byte of Python -> Use this as a reference, starting at First Steps. DO NOT follow the installation instructions to download Python โ you already have Python installed!
- Official Python docs
- The Python Standard Library
๐ Jupyter Notebooks
- RealPython: Using Jupyter Notebooks (video)
- RealPython: Jupyter Notebook: an Introduction
- Setting Up Your Python Development Environment: Jupyter Notebooks section
Asking Questions + Getting Help
- Julia Evans, How To Ask Good Questions
- Our Student Guidelines: Getting Help
- Rukia Sheikh-Mohamed, 5 Steps to Getting Unstuck
๐ฆ Code & Notes
- Notes
- Intro to Python notebooks (Notebooks 1-5)