Answered step by step
Verified Expert Solution
Question
1 Approved Answer
class BankAccount (): interest_rate = 0.3 def __init__(self, name, number, balance): self.name = name self.num = number self.bal = balance def withdraw(self, amount): self.bal =
class BankAccount (): interest_rate = 0.3 def __init__(self, name, number, balance): self.name = name self.num = number self.bal = balance def withdraw(self, amount): self.bal = self.bal - amount def deposit(self, amount): self.bal = self.bal + amount def add_interest(self): self.bal += self.bal * self.interest_rateModify accounts.py to: 1. Put a comment after the instance and class variables to indicate what they are: a. i.e #class variable
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started