Build a User Configuration Manager - Build a User Configuration Manager

Tell us what’s happening:

Super confused and lost on trying to get tests 25 and 27 to come through even though

Your code so far

test_settings = {
    'theme': 'dark',
    'notifications': 'enabled',
    'volume': 'high'
}

def add_setting(settings, new_pair):
    key, value = new_pair
    key = key.lower()
    value = value.lower()

    if key in settings:
        return f"Setting '{key}' already exists! Cannot add a new setting with this name."
    else:
        settings[key] = value
        return f"Setting '{key}' added with value '{value}' successfully!"


def update_setting(settings, new_pair):
    key = new_pair[0].lower()
    value = new_pair[1].lower()

    if key in settings:
        settings[key] = value
        return f"Setting '{key}' updated to '{value}' successfully!"
    else:
        return f"Setting '{key}' does not exist! Cannot update a non-existing setting."

def delete_setting(settings, key):
    key = key.lower()
    if key in settings:
        del settings[key]
        return f"Setting '{key}' deleted successfully!"
    else:
        return "Setting not found!"


def view_settings(settings):
    if not settings:
        return "No settings available."
    
    output = "Current User settings:\n"
    for key, value in settings.items():
        setting = f"{key.capitalize()}: {value}\n"
        output += setting
    return output


print(view_settings(test_settings))

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:149.0) Gecko/20100101 Firefox/149.0

Challenge Information:

Build a User Configuration Manager - Build a User Configuration Manager

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-user-configuration-manager/684aaf9ec670c68d20efd0d0.md at main · freeCodeCamp/freeCodeCamp · GitHub

Hey @dan.hannen,

Welcome to freeCodeCamp forum!

Make sure your output matches the below output provided in user stories.

Hey @dan.hannen,

I think you are really close to passing the last few tests. I would check your output carefully and compare it with the exact format shown in the user stories.

Small details like capitalization, spaces, and line breaks can cause the hidden tests to fail. Make sure your returned messages match exactly what the instructions are asking for.

Hope this helps you find the issue!