Why does the UnboundLocalError occur with the variable 'a' in the given Python code

join shbcf.ru