
更改
vote = input('Enter the name of the player you wish to vote for')至
vote = int(input('Enter the name of the player you wish to vote for'))您将从控制台以字符串形式获取输入,因此必须将输入字符串转换为
int对象才能进行数字运算。
欢迎分享,转载请注明来源:内存溢出

更改
vote = input('Enter the name of the player you wish to vote for')至
vote = int(input('Enter the name of the player you wish to vote for'))您将从控制台以字符串形式获取输入,因此必须将输入字符串转换为
int对象才能进行数字运算。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)