Home › Forums › KX Academy › Fundamentals Capstone 5.2 length error › Reply To: Fundamentals Capstone 5.2 length error
-
Hi @Kenan
The problem lies with your last bit of code ‘edge > avgEdgePerOption[avgEdge]’.
You are only able to index into a dictionary, not a table. So as avgEdgePerOption returns as a table, when you run ‘avgEdgePerOption[avgEdge]’ it returns nothing (screenshot below).This is what causes the length error as edge is a list and avgEdgePerOption[`avgEdge] is an empty dictionary.
Hope this helps!
Thanks,
Megan🙂