#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2013
    Posts
    55
    Rep Power
    2

    Need help with lining up colums


    I created a program where you enter a balance and then it records your deposit/withdrawal amounts and gives back the amount left. i lined up the columns like this:

    def deposit (date, details, deposit):
    global g_balance
    g_balance = g_balance + deposit
    printNow("%s %15s \t\t$%10.2f \t$%10.2f" % (date,details,deposit, g_balance))

    Problem is the lecturer said we have use def printLedgerLine to line up these and i dont know how i could do that
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,854
    Rep Power
    481
    def printLedgerLine(date,detail,amount):
    printNow("%s %15s \t\t$%10.2f \t$%10.2f" % (date,details,deposit, g_balance))
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo