Need help with python

i have this error
line 140 image
line 147 image
line 92

local variable ‘k’ referenced before assignment…

means, probably you’d forgot to give k some value before line 92. If k is not assigned anything, then it couldn’t be compared.

This is the most I can conclude from your snapshots.

1 Like