Hello,
Tell us what’s happening:
I am having trouble generating the check_funds method for the budget class. Based on the error message there seems to be a type error but I am out of my wits in terms of how to go about fixing this. The error message is the following:
Traceback (most recent call last):
File “main.py”, line 12, in
food.transfer(50, clothing)
File “/home/runner/fcc-budget-app/budget.py”, line 21, in transfer
if self.check_funds(amount):
File “/home/runner/fcc-budget-app/budget.py”, line 26, in check_funds
if amount > self.balance:
TypeError: ‘>’ not supported between instances of ‘Category’ and ‘float’
Will be grateful for any help that I can get here…
Your code so far
https://repl.it/@ariyosh/fcc-budget-app#budget.py
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36
.
Challenge: Budget App
Link to the challenge: