# Prompt the user to enter a color value from the list userColor = input(“Enter

# Prompt the user to enter a color value from the list
userColor = input(“Enter

# Prompt the user to enter a color value from the list
userColor = input(“Enter a color from the list above: “)
# Convert the user’s input to lowercase
color = userColor.lower()
# Create a variable named validColor and set it to True
validColor = True
# Initialize the Spanish color variable
spanishColor = “”
# Using a series of IF/ELIF statements, evaluate the color and set the Spanish equivalent
if color == “red”:
spanishColor = “rojo”
elif color == “blue”:
spanishColor = “azul”
elif color == “green”:
spanishColor = “verde”
elif color == “white”:
spanishColor = “blanco”
elif color == “yellow”:
spanishColor = “amarillo”
else:
# If a valid color was not entered, set validColor to False
validColor = False
# Create a final IF/ELSE statement to evaluate the validColor flag
if validColor:
# If a valid color was entered, display the English and Spanish equivalent
print(f”The English color is ‘{userColor}’ and its Spanish equivalent is ‘{spanishColor}’.”)
else:
# If not, display an error message
print(“Invalid color. Please enter a valid color from the list.”)
This program first prompts the user to enter a color and converts the input to lowercase. Then, it checks if the input matches one of the predefined colors and sets the corresponding Spanish equivalent. If the input is not a valid color, it sets the validColor flag to False. Finally, it uses an IF/ELSE statement to display the English and Spanish equivalent of the color or an error message if the input is not valid.