Here's my code.
userlist = "Angelo","Luigi","Russell" userlist2 = "Von", "Enzo", "R-Cel" #date_exp = '4-8-2032' #date = datetime.strptime(date_exp) class SharedBankAccount: def __init__ (self,userlist,userlist2): #self.acctage = age self.listofusers = userlist self.listofusers2 = userlist2 self.bankBalance = 0.0 def AccountNo (self): #import random #account_number = random.randint(5,10) #for i in range(12): #account_number = random.randint(1,10) print ("The 1st account number is : 009223" ) print ("The 2nd account number is : 009224") def listofUsers (self): print ("1st list of users : {}" .format(self.listofusers)) print ("2nd of list of users : {}" .format(self.listofusers2)) def Balance (self,balance): self.bankBalance = "0" + str(balance) print ("The Available balance is ",balance) def DateCreated (self): import datetime today = datetime.datetime.now() print("The Bank Account was created in :",today) def Withdraw (self): amount_withdraw = int(input("Amount to Withdraw : ")) if self.bankBalance <= amount_withdraw: self.bankBalance -= amount_withdraw print("The amount you withdraw : ",amount_withdraw) else: print("Error! Insufficient balance") def Deposit(self): amount_deposit = int(input("Amount to Deposit : ")) print(amount_deposit) #def AccountAge (self,AcctAge): #self.acct_age = AcctAge def AccExp (self): from datetime import datetime date_exp = '2032-04-08' date = datetime.strptime print("The account will expire on : ",date_exp) #print('Type: ',type(date_exp)) def ShowUsers(self): return self print("The bank users are {}".format(self.listofusers)) def ShowUsers2(self): return self print ("The Second bank users are {}" .format(self.listofusers2)) def PrintBankDetails (self): print("Details : " .format(self.acc_no)) bankaccount = SharedBankAccount(userlist, userlist2) #bankaccount2 = SharedBankAccount(userlist, userlist2) bankaccount.AccountNo() bankaccount.listofUsers() bankaccount.Balance(0) bankaccount.DateCreated() bankaccount.AccExp() bankaccount.Withdraw() bankaccount.Deposit()
Yoriz write Apr-07-2022, 02:48 PM:
Post reverted back as the OP removed everything
Post reverted back as the OP removed everything