Skip to content

TASK: Add hobby system #23

@TheGittyPerson

Description

@TheGittyPerson

Difficulty: Intermediate to Upper-intermediate

TODO:

  • Add a new module hobbies.py with a Hobbies class. This class will keep track of Person's hobbies
  • Add another class called Hobby. This class represents an individual hobby.
  • Hobbies should have a main attribute self.list of type list[Hobby] (unless you can come up with a better name to avoid confusion with the builtin), which stores a list of Hobby objects.
  • Hobby should have a name attribute. I can't come up with anything else at the moment, so I'll leave the rest to you.
  • Methods to add to Hobbies:
    • add_hobby
    • remove_hobby
    • is_adhd: if the number of hobbies exceeds a certain threshold (self.adhd_threshold maybe?)
    • is_hobbyless
    • Come up with more yourself—be creative
  • Integrate the hobby system into Person: Add self.hobbies = Hobbies() in __init__
  • Add as many features as you can; use your imagination!
  • Remember to add type hints & docstrings and follow PEP 8

PR steps:

  1. Fork this repo
  2. Clone the forked repo
  3. Create a new branch: name the branch feature/hobby-module
  4. Push commits to your remote fork
  5. Create a PR titled TASK: Add hobby system (#23)
  6. At the end of the PR description, add Closes #23
  7. Submit the PR (Ensure you enable write access for code owners)
  8. Optional: Request a review from a code owner

Read CONTRIBUTING for more details.

Feel free to ask any questions here.
Leave a comment if you wish to work on this task!

Metadata

Metadata

Assignees

Labels

featureNew feature or enhancementgood first issueGood for newcomershelp wantedExtra attention is neededstaleNo activity here in a whiletaskThis is a task issue / PR completing a task🦗 Upper IntermediateGood for growing devs with more confidence in programming🦟 IntermediateGood for growing devs with confidence in programming

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions