Build a User Configuration Manager - Build a User Configuration Manager

Tell us what’s happening:

My code does not recognize the lower() around update_settings and will not check off 11, 12 to convert key and value to lower. Is it wrong? The message when checking the code says “The update_setting function should convert key to lowercase.”

Your code so far

test_settings = {'monitor': '4K UHD', 
'theme': 'HDMI',
'resolution': '3840x2160',
'contrast': '70'}
def add_setting(settings, new_setting):
    key, value = new_setting
    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.update({key:value})
        return "Setting 'volume' added with value 'high' successfully!"

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

Your browser information:

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

Challenge Information:

Build a User Configuration Manager - Build a User Configuration Manager

Could you point to the part that updates the values?

In your if statement when you are looking for the key in settings are you looking for the key in the right way?

Also how are you defining the key returned in your message?

Hi @Bloxed ,

Please finish writing the code for the function, making sure it returns something, before you test it.

Happy coding!