Python Unboundlocalerror Local Variable ‘num Referenced

Python Unboundlocalerror Local Variable ‘num Referenced