【发布时间】:2022-06-14 22:22:42
【问题描述】:
这是我的代码:
if num_of_friends >= 1:
print("All of your friends are gone and you are widely disliked. Your popularity goes down by 20.")
popularity = popularity - 20
如果我拒绝某人并且另一个人离开了我的小组,它会告诉我上面的打印声明。我还有两个朋友,但它认为我没有。帮帮我!
【问题讨论】:
-
如果您有朋友,则您输入的是
if语句,而不是num_of_friends == 0。 -
2 个好友仍然 >= 1,所以条件为真。您可能需要检查条件逻辑。
-
也许你没有朋友 ;-;
标签: python