I need to figure out what is wrong with this program and correct it so it works. I have been screwing around with it for hours and still cannot figure out what is wrong. I know that I need to change the first line, but I have no idea how to use python, so I have no idea have to recognize a problem and thus cannot diagnose or recover from one either. :( Please help. I know this must be easy for someone out there. :)
The following program asks a user to input a single character. If the user inputs an
“r”, “g”, or “b”, it should print “You have input a color component” and then stop. If the
user inputs any other character it should print “You have not input a color component”,
and then stop.
color = raw_input("Input a color component character: ")
if color == "r":
print "You have input a color component"
if color == "g":
print "You have input a color component"
if color == "b":
print "You have input a color component"
else:
print "You have not input a color component"
stop.
Admin edit Code section indented for you, please highlight your code next time by yourself and push TAB