Tell us what’s happening:
test_settings = {‘Theme’:‘dark’,‘Notifications’:‘enabled’,‘Volume’:‘high’}
def add_setting(settings,new_pair):
updated_pair = tuple(i.lower() if isinstance(i, str) else i for i in new_pair)
key, value = new_pair
it did not pass through the steps 4 and 5 .. got struck.. any one can help on this ?
Your code so far
test_settings = {'Theme':'dark','Notifications':'enabled','Volume':'high'}
def add_setting(settings,new_pair):
updated_pair = tuple(i.lower() if isinstance(i, str) else i for i in new_pair)
key, value = new_pair
"""
if key in settings :
return f"Setting '[{key}]' already exists! Cannot add a new setting with this name."
else:
test_settings[key] = value
return f"Setting '[{key}]' added with value '[{value}]' successfully!"
print(test_settings)
"""
pass
def update_setting():
pass
def delete_setting():
pass
def view_settings():
pass
add_setting(test_settings,('Theme','dark'))
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 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