by CodeChum Admin
My favorite color is blue. What's your favorite color? Never mind it doesn't matter, as long as you know how to identify which color is given.
Instructions:
Input
A line containing a string.
red
Output
A line containing a string.
Red
color=input("Enter a string representing a color: ")
color=color.lower()
if color=="red":
print("Red")
elif color=="blue":
print("Blue")
elif color=="green":
print("Green")
else:
print("None of the Above")
Enter a string representing a color: rEd
Red
Comments
Leave a comment