为什么后者会出bug
结果不是想要的 两者数值相同输出平局
后面那句都有哪些问题呢
1条回答 默认 最新
- bekote 2021-11-09 21:49关注
因为player and computer == 1如果computer等于1,player的值只要不是负数和0就为true,式子相当于true and true,这样起不到判断两者值是否相等的作用
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
因为player and computer == 1如果computer等于1,player的值只要不是负数和0就为true,式子相当于true and true,这样起不到判断两者值是否相等的作用