0
I don’t understand why this code doesn’t fully work
commands = ["Lights Off", "Lock the door", "Open the door", "Make Coffee", "Shut down"] #your code goes here x = input() if x not in commands: print("Not Supported") else: print("OK")
3 odpowiedzi
+ 9
Wesley Li ,
if you really have a problem, we need some more details from you:
▪︎give a clear and complete description about your task, also name tutorial and lesson number
▪︎if there are error messages please post them here
▪︎give at least one sample with input data and the expected output
▪︎also specify the programming language in a tag
thanks for your understanding!
+ 3
Maybe s should be lowercase in
Supported
print("Not supported")
+ 2
Hi Wesley Li I tried your code and works just fine. You input must match 100% with command . May be you are getting error due to Uppercase or lowercase input.