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 Answers
+ 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.