from time import gmtime, strftime class Accounts: type='VERSION 1.0' def __init__(self,name,balance): self.name=name self.transtime=[] self.trans=[] self.trantype=[] self.balance=balance print "Account Created for ",self.name,"With Opening balance =",self.balance def withdraw(self,amount): if self.balance-amount>0: print "Amount withdrawn=",amount self.balance-=amount self.trans.append(amount) self.trantype.append("Withdraw") self.transtime.append(str(strftime("%a, %d %b %Y %H:%M:%S ", gmtime()))) else : print "InSufficient balance" def deposit(self,amount): if amount>0: self.balance+=amount self.trans.append(amount) self.trantype.append("Deposit") self.transtime.append(str(strftime("%a, %d %b %Y %H:%M:%S ", gmtime()))) else : print "Invalid amount " def showbal(self): print'*'*50 print "Account of =",self.name print "Account balance=",self.balance print'*'*50 def transactions(self): print'*'*50 print "Account of =",self.name print '\tAMOUNT\t\tTYPE\tTIME' for i in range (len(self.trans)): print'-'*80 print "\t",self.trans[i],"\t\t",self.trantype[i],self.transtime[i] print'-'*80 print ("Entering in Program") raj=Accounts("Raj Dubey",100) raj.showbal() raj.deposit(3000) raj.showbal() raj.withdraw(1200) raj.showbal() raj.deposit(564) raj.showbal() raj.transactions() mansur=Accounts("Mansur Alam",1) mansur.showbal() mansur.deposit(3000) mansur.withdraw(564) mansur.transactions()
In the ever-evolving world of web development, managing builds and deployments can often be cumbersome and error-prone. Today, we're excited to introduce a tool designed to simplify and streamline this process: the React WAR Generator . What is the React WAR Generator? The React WAR Generator is a Python-based tool that automates the creation of WAR (Web Application Archive) files for Java web applications. It caters specifically to frontend projects built with React or similar frameworks, making it easier to package and deploy your web applications to a Tomcat server. Key Features Profile-Based Builds : With support for multiple profiles ( dev , test , prod , default ), you can build your application according to different environments and configurations. Version File Generation : Optionally generate a version file that integrates versioning information directly into your TypeScript files, ensuring your build versions are always up-to-date. Tomcat Deployment : Simplify your deploy...
Comments
Post a Comment
share your thoughts ....