python面向对象浮点数出错有报错

class Account:
    def __init__(self,owner,amount:float):
        self.__owner=owner
        self.__amount=amount

    @property
    def owner(self):
        return self.__owner

    @property
    def amount(self):
        return self.__amount

    interest_rate=0.56

    def exchange(self):
        return float(self.owner*Account.interest_rate)

#客户名字
name = input()
#存入钱款
amount = float(input())
account1 = Account(owner=name, amount=amount)
print("客户{0}的余额为{1},兑换后的美元余额最多为{2}".format(account1.owner, account1.amount,account1.exchange()))
# 一天之后 更改汇率为0.78
Account.interest_rate = 0.78
#返回兑换后的美元余额
print("客户{0}的余额为{1},兑换后的美元余额最多为{2}".format(account1.owner, account1.amount,account1.exchange()))

img

第17行: self.ownerAccount.interest_rate 姓名汇率 所以报错 ;应该为: self.amount*Account.interest_rate

还有第二行: def __init__(self,owner:str,amount:float): owner后加上:str否则容易误解

img