Skip to content
Snippets Groups Projects
root.py 228 B
Newer Older
Thomas Röck's avatar
Thomas Röck committed
from dataclasses import dataclass


@dataclass
class Root:
    name: str
    calories_per_length: int
    length: float = 0.0

    @property
    def calories(self) -> float:
        return self.calories_per_length * self.length