/week2

Primary LanguagePythonMIT LicenseMIT

Week 2 assignment

Python Bootcamp for Data week 2 assignment

This week, you learned how to create functions, classes, and methods. These are the basis of almost any program you might create with Python. Functions and classes are useful for organizing code, increasing maintainability and code reuse. You'll use that knowledge to complete the assignment in this repository.

💡 This template repository is made for GitHub Classroom delivery, but can be used independently if you want to learn on your own.

Assignment instructions

This repository uses automated grading (or testing). When starting, all automated tests will fail. Your task is to make them all pass.

  1. Open main.py and address each of the problems defined in the comment blocks
  2. Make your changes and push them the repository.
  3. Watch the tests results in the actions tab of your repository. Every push will trigger the autograding.
  4. Repeat the fix/push/verify cycle until all tests are passing and the actions tab shows a green.

💡 As part of the GitHub Classroom setup, you might get an automated Pull Request created for direct feedback by your Professor or by the TAs.

Verify your work by running pytest -v in the root of your repository. If you are using Codespaces, pytest will already be installed for you and available for you to run tests that are used for auto-grading.

Resources

Use the linked resources in this section to review and reference any of the previously covered content. All questions in this assignment come from content previously covered in the bootcamp course.

Week 2 Reference Content

  1. Working with functions
  2. Building classes and using methods
  3. Modules and advanced usage

Reading and code resources

Course video and links

🎥 Click the image below to access week 2 of the full course on O'Reilly

O'Reilly

This assignent is for week 2 (out of 4) of the Python Bootcamp for Data. The whole course has four weeks:

Bonus challenge

Open the bonus directory and then look into the main.py file. It has almost the same code as the previous bonus challenge. You will need to follow the instructions in the comments to add functions and classes. This bonus assignment is not graded and will not trigger auto-grading. It is meant to be a challenge for you to practice what you learned in the course.