Momentum logo
Team 14 Classroom

Python Dictionaries and List Comprehensions

Posted on Aug 10th, 2022

🗓️ Today’s topics

  • Dictionaries
  • Tuples
  • Lists and list comprehensions

🐍 Code Break

🎯 Project

Begin the project,Word Frequency . A dictionary will help you solve the problem of counting words. This will be due on Monday, 8/15.

At minimum you should be able to count words and print that count, even if the formatting of your output is not 100% on point.

🔖 Resources

🦉 Code & Notes

🐍 Writing Python 🐍

Posted on Aug 9th, 2022

🗓️ Today’s topics

  • Python
    • variables
    • if statements
    • while loops
    • Practice with Turtle
    • Input and output with input and print
    • Functions

✅ TODO today

Sign up for this practice site: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

Exercises we will work on in class:

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

🎯 Project

Please complete the Python section through “More iterating with Python” by Wednesday morning, 8/10.

🥡 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

Tags: phase-2 python

🐍 Welcome to Python! 🐍

Posted on Aug 8th, 2022

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. Read Python VS JavaScript – What are the Key Differences Between The Two Popular Programming Languages?

🎯 Project

We’ll be using the Thinkific content as an introduction to Python concepts. Please complete the Python section through while loops. Please come to class with 3 questions tomorrow, 8/9

🔖 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

Tags: phase-2 python

JavaScript and Forms

Posted on Aug 3rd, 2022

🗓️ Today’s topics

  • HTML forms
  • Working with form data in JavaScript
  • Client-side form validation with JavaScript

🎬 End of Phase Technical Presentations

The presentations at the end of this phase will be in the form of a short video. Each of you will record a screencast on one of the projects you did in Phase 1. The video should be 4-5 minutes long, and no longer.

Your target audience is a brand new Momentum student who is just at the beginning of Phase 1 after Foundations. Imagine you are teaching them how to do what you’ve done in this project. Give them the benefit of your experience over these past several weeks.

This video does not have to be polished, scripted, or edited. But your viewer should be able to follow what you’re saying and understand the points you are making. You should illustrate the concepts you are talking about with examples from your code.

Suggestions for how to use your time. ~ 1 min - show the project in the browser and highlight its functions ~ 3 min - pick a couple of elements of the code that you want to explain line by line and show what you learned in the process ~ 1 min - a challenge you encountered in the project and how you got through it

I suggest using Loom – it’s very simple to use for screencasts and for camera videos and will let you share your video easily. The free account also limits your videos to 5 minutes, so it should help you with timing!

Loom lets you record a screencast with or without your face showing. You can choose according to your preference.

Please post your video and share the url for it using this form. Your videos are due by EOD on Thursday, August 4.

✅ Requirements for passing the phase

  1. The code you chose to illustrate runs without errors.
  2. The code you illustrate meets the (non-spicy) requirements of the assignment.
  3. You can explain how your code works.
  4. Your presentation includes JavaScript.
  5. You turn in a video.

🔖 Resources

⭐️ EXTRA/TMI

🦉 Code & Notes