I tired to make a bank in which one can deposit and withdraw funds , but i am getting a type error
Here is the code:
class Account():
def __init__(self, name, balance, min_balance):
self.name = name
self.balance = balance
self.min_balance = min_balance
def Deposit(self,amount):
self.balance += amount
def with_draw(self,amount):
if self.balance - amount >= self.min_balance:
self.balance - amount
else:
print("Sorry you have reached you,r minimum balance")
def Statement(self):
print(f"You,r Current balance is {self.balance}")
class Current(Account):
def __init__(self, name, balance):
super().__init__(self, name, balance, min_balance = -1000)
HERE IS THE ERROR:
TypeError: __init__() got multiple values for argument 'min_balance'
What I have tried:
i googled the oproblem , i tried to give the minimum balance no value in the code but then when i write like x = Current("ubaid",50,10)
i insert the value of min balance in interpreter but it gives an error
TypeError: __init__() takes 3 positional arguments but 4 were given