Python Budget App: Maybe bug in

The problem is about the check_funds function.
Let’s see what does it returns
A check_funds method that accepts an amount as an argument. It returns False if the amount is less than the balance of the budget category and returns True otherwise. This method should be used by both the withdraw method and transfer method. (from

but in test_check_funds,, "deposit")
actual =
expected = False
self.assertEqual(actual, expected, 'Expected 'check_funds' method to be False')

May I ask why it is expected to return False? Isn’t that the parameter passed in is larger than the amount in

Do I misunderstand anything?


you have just deposited 10 in the food category:

then check if you can use 20

well, you can’t use 20 if you have only 10

amount < balance


amount I take away WITHIN amount I have


I take a part of my money off




should return True

Conclusion: amount < balance returns True.

Contradiction happens.

uh, seems someyhing got switched there, you are right

Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.

1 Like

I got caught on this for a bit I fixed it then I got caught on the 10 -10 = 0