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()
1. go to blogger dashboard, select template and edit html. 2. search for </head> to add script. - you may download and upload to your site, or just use this link (no download required) script <script src='http://docs.google.com/uc?id=0B7xJbTAja8i0a0ZJbXJ2TkkwSW8&export=download' type='text/javascript'/> 2. search for ]]></b:skin> to add style/css. img.label_thumb{ float:left; padding:5px; border:1px solid #8f8f8f; background:#D2D0D0; margin-right:10px; height:55px; width:55px; } img.label_thumb:hover{ background:#f7f6f6; } .label_with_thumbs { float: left; width: 100%; min-height: 70px; margin: 0px 10px 2px 0px; adding: 0; } ul.label_with_thumbs li { padding:8px 0; min-height:65px; margin-bottom:10px; } .label_with_thumbs a {} .label_with_thumbs strong {} 2. save template. 3. add a widget. 3. edit widget. at this example i use random post with label "blogger", you must replace it with your label. <div s...
Comments
Post a Comment
share your thoughts ....