โ–ถ๏ธ Section 15: Final Run & Extension

๐Ÿ“ Full Code Review

Below is the complete project code from project refrence/pet_manager.py. Use it to check your work and confirm that your final file matches the full program.

Code image: s15-code

๐Ÿ›  Extensions

To earn full points, you must copy the final code into a new file named Mainfile.Ext.py and add at least one extension. If you do no extension, the highest possible score is a B (2.5/4).

Steps to complete the extension requirement:

  1. Copy the final code into Mainfile.Ext.py.
  2. Add at least one extension (choose from the list below or propose your own).
  3. Test your changes and verify with the teacher if you made a custom idea.

Extension ideas (choose at least one):

  • Add a new species class (like Rabbit or Turtle) with its own special_action().
  • Add a new stat (like energy) and update actions to affect it.
  • Add a save/load system that writes pets to a file and loads them back.
  • Add a difficulty setting that changes tuning constants (easy/normal/hard).
  • Add a mood message that changes based on how the pet is doing.

๐Ÿง  Core Concepts List

  • Variables and constants for game tuning
  • Functions and return values
  • Classes, objects, and methods
  • Encapsulation and "private-ish" attributes
  • Properties and read-only accessors
  • Abstract classes and required methods
  • Inheritance and method overriding
  • super() for extending base behavior
  • Polymorphism with shared method names
  • Lists and dictionaries of objects
  • Input validation with loops
  • Game loop structure and turn-based logic
  • Random starting values and stat decay
  • String formatting for readable output