麻烦"如果" Pyscripter上带变量的语句

时间:2016-11-06 19:04:08

标签: python variables if-statement

这是我写的代码

form=input("Have you counted your time with hours, minutes, or seconds?")

if form=="hours" or "Hours":
    timec="hour(s)"
    multiple="hours"

elif form=="minutes" or "Minutes":
    timec="minute(s)"
    multiple="minutes"

elif form=="seconds" or "Seconds":
    timec="second(s)"
    multiple="seconds"

print(multiple)

每次我运行它并输入"分钟"或者"秒",无论如何我都会得到几个小时?有什么帮助吗?

0 个答案:

没有答案