Build a User Configuration Manager - 27 verification

Tell us what’s happening:

how y’all doing? im great

at the verification 27 i’ve a problem i tried everything and somehow still wrong
if could get any hint about what im missing would be VERY useful

Your code so far

def add_setting(setting_dict, tuple_kv):
    key, value = tuple_kv
    key = key.lower()
    value = value.lower()

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

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

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


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


print(view_settings(test_settings))        
        

Your browser information:

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

Challenge Information:

Build a User Configuration Manager - Build a User Configuration Manager

  1. view_settings should capitalize the first letter of each setting name.

How should the setting value be formatted?

Oh my god, am I really that dumb?

It’s not dumb at all, you formatted it exactly as the example displays.

However, you just went a bit extra since no instruction actually says to format the values in a particular way. The test isn’t clear what input it’s sending or what’s wrong.