class Trade: def __init__(self, amount: float, total_cost: float, date: str) -> None: self.__amount: float = amount self.__total_cost: float = total_cost self.__date: str = date @property def amount(self) -> float: return self.__amount @property def total_cost(self) -> float: return self.__total_cost @property def date(self) -> str: return self.__date @property def price_per_coin(self) -> float: """ Calculate the price per coin based on the total cost and the current amount """ return self.total_cost / self.amount def __repr__(self) -> str: return f"Trade(amount={self.amount}, price_per_coin={self.price_per_coin:.2f}, total_cost={self.total_cost:.2f}, date={self.date})"