Build a Budget App - Build a Budget App

Tell us what’s happening:

I am failing step 7 and step 11 this is my code below but I don’t know what is wrong

Your code so far

class Category:
    def __init__(self, name):
        self.name = 0
        self.ledger = []
        self.balance = 0
    
    def deposit(self, amount, description=''):
        self.ledger.append({'amount': amount, 'description': description})
        self.balance += amount
    
    def withdraw(self, amount, description=''):
        if self.check_funds(amount):
            self.ledger.append({'amount': -amount, 'description': description})
            self.balance -= amount
            return True
        else:
            return False

    def get_balance(self):
        return self.balance

    def transfer(self, amount, another_category):
        if self.check_funds(amount):
            self.withdraw(amount, f'Transfer to {another_category.name}')
            another_category.deposit(amount, f'Transfer from {self.name}')
            return True
        else:
            return False


    def check_funds(self, amount):
        return amount <= self.get_balance()

def create_spend_chart(categories):
    pass

Your browser information:

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

Challenge Information:

Build a Budget App - Build a Budget App

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-budget-app/5e44413e903586ffb414c94e.md at main · freeCodeCamp/freeCodeCamp · GitHub

Okay so do you know what happens if you call the transfer method on a ledger object like in the example?

nevermind the issue was that self.name = 0 instead of self.name = name