0
31.2 practice python 3 what's wrong with my code
what is wrong with my code in " just say it " if c == c : print ("ok") else : print ("Not supported")
5 Answers
+ 4
c is not defined before if statement.
+ 2
Post the code question. so we can help
+ 2
First you need to take a input.
Next check if it is in the list of Commands, which are already given in half code to you.
if in list print "Ok" Else print "Not Supported"
edit : what your c there?
+ 1
MATOVU CALEB
These are the instructions:
âYouâre making a voice recognition system.
The supported commands are stored in a list.
Complete the program to take a command as input, check if itâs supported and output "OK", if it is, and "Not supported", if not.
Sample Input
Lights Off
Sample Output
OKâ
ââââââââââââ
And the code starts like this:
commands = ["Lights Off", "Lock the door", "Open the door", "Make Coffee", "Shut down"]
#your code goes here
0
c = ["Lights Off", "Lock the door", "Open the door", "Make Coffee", "Shut down"]