Tell us what’s happening:
In the console I got for the first 15 story points the following message: “Your code raised an error before any tests could run. Please fix it and try again.” In the 18th story point it starts with the regular message from story point 18.
In the same time I don’t get any message from the terminal, except I have an syntax error. In this sense, the code looks correct (there are obviously mistakes in it). But in the first step, it’s not about the code but about the message in the console.
Is this a glitch or something? Thank you in advance!
Your code so far
view_settings = [
{
'theme': 'dark',
'notifications': 'enabled',
'volume': 'high'
}
]
def add_setting(settings, pair):
pair = key, value
value = settings[key]
settings[key.lower()] = value.lower()
if settings.key(setting) in settings:
return f"Setting '{key}' already exists! Cannot add a new setting with this name."
if not settings.key(setting) in settings:
return f"Setting '{key}' added with value '{value}' successfully!"
def update_setting(settings, pair):
pair = key, value
value = settings[key]
settings[key.lower()] = value.lower()
if settings.key(setting) in settings:
return f"Setting '{key}' updated to '{value}' successfully!"
if not settings.key(setting) in settings:
return f"Setting '{key}' does not exist! Cannot update a non-existing setting."
def delete_setting(settings, key):
settings[key.lower()]
if settings.key(setting) in settings:
settings.remove(key)
return f"Setting '{key}' deleted successfully!"
def view_settings(settings):
if settings == {}:
return "No settings available."
if settings != {}:
return f"Current User Settings: 'key.upper() = settings[key]'"
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:150.0) Gecko/20100101 Firefox/150.0
Challenge Information:
Build a User Configuration Manager - Build a User Configuration Manager