homeworkpython unboundlocalerror local variable 'res' referenced before assignmentShare on FacebookShare on Twitter238