Budget App problem

I don’t know what’s the problem.
i’ll appreciate if you could help me.
it seems like there are more spaces in my output than in the correct output(between “[47 chars]” and “900.00”, but i don’t know how to correct it. i’m sure it is a little issue.

Thank you.

Your code so far

def repr(self):
body = ‘’
head = self.category.center(30, ‘*’) + ‘\n’
for n in self.ledger:
body += n[‘description’][:23].ljust(23) + str(n[‘amount’]).rjust(7) + ‘\n’
total = 'Total: ’ + str(self.get_balance())
return head+body + total

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.115 Safari/537.36

Challenge: Budget App

Link to the challenge:

I could be wrong, but it looks like your output is displaying “900” instead of 900.00" and “20” instead of “20.00” - I’m not the best at reading those error codes though.


I am not sure but it looks like there is something wrong with your withdraw function. Make sure the keys “amount” and "description return the right values.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.