Build a User Configuration Manager - Build a User Configuration Manager

Tell us what’s happening:

The compiler seem to be having errors. Everytime I use the “Run the Tests” button it will not check off the items I have already done and the error messages in the console are not rendering properly.

Your code so far

def add_setting({'Theme': ['light', 'dark'], 'Notifications': ['enabled', 'disabled'], 'Volume': ['low', 'high']}, ('key', 'value')):
    return "Setting '[key]' already exists! Cannot add a new setting with this name."
    return "Setting '[key]' does not exist! Cannot update a non-existing setting."


def update_setting({'Theme': ('light', 'dark'), 'Notifications': ('enabled', 'disabled'), 'Volume': ('low', 'high')}, ('key', 'value')):
    return "Setting '[key]' updated to '[value]' successfully!"
    return "Setting '[key]' does not exist! Cannot update a non-existing setting."


def delete_setting({'Theme': ('light', 'dark'), 'Notifications': ('enabled', 'disabled'), 'Volume': ('low', 'high')}, ('key', 'value')):
    return "Setting '[key]' deleted successfully!"
    return "Setting not found!"

def view_settings({'Theme': ('light', 'dark'), 'Notifications': ('enabled', 'disabled'), 'Volume': ('low', 'high')}, ('key', 'value')):
    return "No settings available."
    return "Current User Settings:"


test_settings = {
    'Theme': ['light', 'dark'], 
    'Notifications': ['enabled', 'disabled'], 
    'Volume': ['low', 'high']
}

Your browser information:

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

Challenge Information:

Build a User Configuration Manager - Build a User Configuration Manager

we are aware that the terminal is having issues, at this time the text in the terminal is only visible in night mode

I would not expect any test to pass with your code

all your functions are defined this way, which is not allowed and causes syntax issues

you may want to review about how functions work, and how to define function parameters

also it looks like you have hard-coded conditionals or variables that check for specific expected values. That is not solving this problem in the general case. Imagine if you were given different input values. Would your code be able to solve those problems?

To find out more about what hard-coding is or about why it is not suitable for solving coding questions, please read this post: Hard-coding For Beginners

Let us know if you have a question about how to make your code more flexible.

Thanks for the feedback. The initial code I wrote is just a placeholder to hit the main requirements of the project; I was planning to go back and modify it and expand on it once the terminal starts working properly again.

now it is working properly again