Build a User Configuration Manager - Build a User Configuration Manager

Tell us what’s happening:

I seem not to understand why it doesn’t pass for test 4 ,5,7 and 8 for the add_setting function though test 6 passes. Any reason?

Your code so far

def add_setting(diction,tupel):
     lower_t = tuple(item.lower() for item in tupel)
     if lower_t[0] in set(diction.keys()):
         return f"Setting '{lower_t[0]}' already exists! Cannot add a new setting with this name."
     else:
          diction.update({'{lower_t[0]}':'{lower_t[1]}'})
          return f"Setting '{lower_t[0]}' added with value '{lower_t[1]}' successfully!"
     
     

     
    
          



test_settings = {
    'Theme':'dark',
    'Language':'English',
    'Notifications':'enabled'
}
print(add_setting({'theme': 'light'}, ('THEME','dark')))
print(add_setting({'theme': 'light'}, ('volume', 'high')))

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

Hi @couragekumahkojo ,

Please test your code. Add print(diction) after this line to see the issue.

Happy coding!

I have seen it…Thank You