Build a User Configuration Manager - Build a User Configuration Manager

Tell us what’s happening:

Tests 25, 26 and 27 are not running. I am getting the desired output on the terminal but the tests are not running

Your code so far

test_settings = {
    "theme" : "dark",
    "notifications" : "enabled",
    "volume" : "high"
   
}
test_settings2 = {}
user_configuration = [test_settings]
def add_setting(settings_dictionary, tuple_pair):
    key, value = tuple_pair
    key = str(key).lower()
    value = str(value).lower()
    if key in settings_dictionary:
        return f"Setting '{key}' already exists! Cannot add a new setting with this name."
    settings_dictionary[key] = value
    return f"Setting '{key}' added with value '{value}' successfully!"

add_setting(test_settings, ("theme", "light"))

def update_setting(settings_dictionary, tuple_pair):
    key, value = tuple_pair
   
    key = str(key).lower()
    value = str(value).lower()
    if key in settings_dictionary:
        settings_dictionary[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_dictionary, key):
    
    key = str(key).lower()
    if key in settings_dictionary:
        del settings_dictionary[key]
        return f"Setting '{key}' deleted successfully!"
    else:
        return "Setting not found!"

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

result = view_settings(test_settings)
print(result)

Your browser information:

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

Challenge Information:

Build a User Configuration Manager - Build a User Configuration Manager

Compare what you see in the console when you call your function to this:

Current User Settings:
Theme: dark
Notifications: enabled
Volume: high

Do they look the same?

No but ive changed it and the tests are still not working

if you need additional help please post your updated code

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.