Resistor color, Tests getting timed out

Hello
My tests are getting timed out.
Here is my code and tests results

COLORS = {‘black’:0,
‘brown’:1,
‘red’:2,
‘orange’:3,
‘yellow’:4,
‘green’:5,
‘blue’:6,
‘violet’:7,
‘grey’:8,
‘white’:9
}

def color_code(color):
return COLORS[color]

def colors():
return list(COLORS.keys())


Your tests timed out

Your tests timed out. This might mean that there was an issue in our infrastructure, but more likely it suggests that your code is running slowly. Is there an infinite loop or something similar?

Please check your code, and if nothing seems to be wrong, try running the tests again.

1 Like

I don’t understand where I’m getting wrong

I think the website is down.
I can’t pass any test either, no matter what the exercise. The tests always expire.

1 Like

Thanks a lot
I’ll check on it later

2 Likes

Does python’s keys() return the dict keys in insertion order?

@glennj – Yes, since Python 3.7, Python dicts are guaranteed to preserve insertion order, and view objects (dict.keys(), dict.items()) as well as list(dict) will return keys (and (key, value) tuples) in insertion order.

2 Likes

There are some infrastructure issues (related to Denial of Service attacks) and the site is under heavy load. This is likely the cause and not your code.

cc @D-nova

so issue with the site it seems

You can read more information here: 🚨 Tests timing out? Read this

@416LJ @D-nova Try again now!