Words of Wisdom

Use a function if your code is an action that takes inputs and returns an output without needing to remember past interactions. Unlike languages like Java, Python does not force you to wrap everything in a class. Use a class if you need to manage persistent state, bundle data with behavior, or create multiple independent instances of an object.