class bankaccount: def __init__(self,name, accnum=0, amount=0): self.name = name self.accountNum = accnum if amount >= 0: self.balance = amount else: self.balance = 0 def deposit(self,amount): if amount >= 0: self.balance += amount def withdraw(self,amount): if amount > 0 and amount <= self.balance: self.balance -= amount return amount if amount > self.balance: am = self.balance self.balance = 0 return am return 0 def transfer(self,amount,otherAccount): money = self.withdraw(amount) otherAccount.deposit(money) def __repr__(self): print ("Why am I here") result = "" result += "Name: "+self.name + "\n" result += "Account Num: "+str(self.accountNum) + "\n" result += "Account Balance: "+str(self.balance) + "\n" return result acc1 = bankaccount("shutong",1234,80) acc2 = bankaccount ("Igli",324,999999999) print (acc1) print (acc2) acc2.transfer(99990899,acc1) print (acc1) print (acc2)