From 3bbfa0ac794c653eacbb1f22bdefa165e537e289 Mon Sep 17 00:00:00 2001 From: Oct_Autumn <53611887+Oct-autumn@users.noreply.github.com> Date: Wed, 30 Mar 2022 23:21:34 +0800 Subject: [PATCH] Correction at line 22 There is no "interest_rate1" object in class Account. --- code/chapter11/ch11.3.4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/chapter11/ch11.3.4.py b/code/chapter11/ch11.3.4.py index 131dc3b..43ceb5d 100644 --- a/code/chapter11/ch11.3.4.py +++ b/code/chapter11/ch11.3.4.py @@ -19,9 +19,9 @@ def __init__(self, owner, amount): print('利率:{0}'.format(Account.interest_rate)) print('Account利率:{0}'.format(Account.interest_rate)) -print('ac1利率:{0}'.format(account.interest_rate1)) +print('ac1利率:{0}'.format(account.interest_rate)) print('ac1实例所有变量:{0}'.format(account.__dict__)) account.interest_rate = 0.01 account.interest_rate2 = 0.01 -print('ac1实例所有变量:{0}'.format(account.__dict__)) \ No newline at end of file +print('ac1实例所有变量:{0}'.format(account.__dict__))