Momentum logo
Team 10 Classroom

🐍 Welcome to Python! 🐍

Posted on Oct 25th, 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 statements
    • while loops
    • Input and output with input and print
    • Functions

✅ TODO today

  1. Make sure your dev environment is set up, using our guide.
  2. Complete this introductory Learning Exercise on Exercism.io, using the in-browser editor.
  3. Complete the first part of this Python tutorial, through the ‘Functions’ section.
  4. 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:

  1. Hello World
  2. Two Fer
  3. Raindrops
  4. 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 work.

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!

How to submit your work

List the urls for your completed problems in a gist on GitHub. A gist is a like a short form repo that you can create directly on GitHub. See this guide for more detail on creating gists.

You should have several Exercism URLs listed in your gist, and they should look like this:

https://exercism.org/tracks/python/exercises/two-fer/solutions/yourexercismusername

You should have ONE gist URL, and it should look like this:

https://gist.github.com/amygori/29f631f9d5dd53d9c685db0e2d17678f

☝️ The above example is formatted with Markdown but it’s fine to use plain text (.txt) for your gist if you’d rather.

To submit your work, paste the URL for your gist into this form.

🔖 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.

Other Python Resources

📓 Jupyter Notebooks

Asking Questions + Getting Help

🦉 Code & Notes

Tags: phase-2 python

Back to home