• fail on 3 test

Question related to mission Moria doors


I've gotten accurate results for result average on 1 test: ['friend', 'fred', 'and', 'friend', 'ted'] [62.976190476190474, 60.0, 42.351190476190474, 62.97619047619047, 45.26785714285714] Exactly as shown in the task! And passed the second test two.But the third test failed and return "friend" instead of "durin".

I'm stumped. Is it mistake in my coefficient function?