I am doing this Project where I make methods in a class that work as a ATM Vestibule but I'm getting this error: This is my code:
class bank_account: def __init__(self, account_number, name, balance): self.account_number = account_number self.name = name self.balance = balance def withdraw(self, amount): if amount > self.balance: print("Insufficient Funds") else: self.balance = self.balance - amount def deposit(self, amount): if amount <= 0: print("Invalid Amount") else: self.balance = self.balance + amount def check_balance(self): print(self.balance) account_holder = bank_account(input("Enter your account number, name and balance: ")) transaction = input("Please enter what transaction you would like to do: (Withdraw, Deposit) ") amount = int(input("Enter the amount you would like to deposit or withdraw: ")) if transaction == 'withdraw' or 'Withdraw': account_holder.withdraw(amount) print(account_holder.check_balance()) elif transaction == 'deposit' or 'Deposit': account_holder.deposit(amount) account_holder = bank_account(input("Enter your account number, name and balance: ")) TypeError: init() missing 2 required positional arguments: 'name' and 'balance'
a == b or a == c, nota == b or c.transaction == 'withdraw' or 'Withdraw'is always true, because'Withdraw'is a non-empty string.