TypeError:“ str”和“ int”的实例之间不支持“ <=”

TypeError:“ str”和“ int”的实例之间不支持“ <=”,第1张

TypeError:“ str”和“ 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
对象才能进行数字运算。



欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5630747.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-15

发表评论

登录后才能评论

评论列表(0条)

保存