There are no access modifiers. Convention: a leading underscore (_cache) means "internal". @property gives you computed getters like Dart's get.
Practice
1. Shopping cart with dataclasses
medium25 XP
Create a frozen dataclass Item(name: str, price_cents: int, qty: int = 1) and a dataclass Cart with an items: list[Item] field defaulting to an empty list. Give Cart a method add(item) and a @propertytotal_cents.
Ctrl/⌘ + Enter runs the tests · Esc then Tab leaves the editor