dimanche 6 novembre 2016

Trouble with "If" statements with variables on Pyscripter

Here is the code i have written

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)

Everytime i run it and input "minutes" or "seconds", i get hours no matter what? Any help?

Aucun commentaire:

Enregistrer un commentaire