我正在尝试显示两种混合原色的二次色。我有点卡在代码上,但似乎一切都对我进行了检查,但当我运行它时,它总是显示我输入的 else 错误消息。我该怎么办?!
print('Choose two primary colors to get their secondary color.')
print('Choose the number 1 for red, 2 for blue and 3 for yellow.')
red = 1
blue = 2
yellow = 3
def main():
prime_1 = input('Enter your first primary color: ')
prime_2 = input('Enter your second primary color: ')
if prime_1 == red and prime_2 == blue:
print('Your secondary color is purple!')
elif prime_1 == yellow and prime_2 == red:
print('Your secondary color is orange!')
elif prime_1 == blue and prime_2 == yellow:
print('Your secondary color is green!')
else:
print('That is not a primary color!')
main()