【发布时间】:2016-11-24 15:37:23
【问题描述】:
这就是我的计算器目前的样子。我这样做是为了学校 python 修订。 http://imgur.com/a/IDJr5
我希望当这个人输入 2 个数字时,它会这样回答 5+5=10
【问题讨论】:
-
将您的代码粘贴到问题中(不要忘记格式化)。此外,您的代码不会按预期运行,因为所有
or条件都是错误的。 -
我的代码确实在我试图做的那个 imgur 中运行
-
你不应该
calculation == "some" or "other"。你应该calculation == "some" or calculation == "other" -
甚至
calculation in ["some", "other"] -
你我现在修好了
标签: python-3.x calculator