local variable ‘count’ referenced before assignment 错误原因:赋值前引用了局部变量count 解决方法:全局变量只可以引用不可以改变,将count转变为局部变量进行定义