Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 1.41 KB

homework_brief.md

File metadata and controls

37 lines (22 loc) · 1.41 KB

Pet Shop

For your weekend homework your task is to write some functions to be used in a pet shop.

We have provided some tests for you. Your job is simply to make those tests pass! Work on one at a time, and when you're ready to move on, unskip the next test, watch it fail, then make it pass. Do not modify the code in the tests.

To run the tests:

python3 run_tests.py

To unskip a test delete the following line in the pet_shop_test.py file:

@unittest.skip("delete this line to run the test")

Remember:

  • Read the error messages! - Python will do its best to tell you why your code isn't working. Don't panic when you see errors or failing tests, the messages are there to help you. Look for the file name and the line number in the error message.
  • Red - Green - Refactor - Your test is passing, awesome! But before you move on, is there anything you can do to make your code more efficient? Or more readable? Or just prettier? Can you reuse functions you have already written?
  • Not all functions need to return something - Sometimes we call a function and then test its effects, rather than test its output.

PDA Reminder:

As part of this homework you are required to take screenshots of the following:

  • A dictionary in a program
  • A function that uses the dictionary
  • The result of the function running

Submit your PDA evidence (screenshots, etc.) to Canvas

PDA Reference: I.T 6