Python Primary to Secondary colors -
so have problem asks me 2 primary colors , tells me color create, when enter 2 primary colors keep getting error message put in if don't enter 2 primary colors. here have.
red = '1' blue = '2' yellow = '3' p1 = (input('enter primary color: ')) p2 = (input('enter primary color: ')) if p1 == '1' , p2 == '2': print('when mix red , blue, purple') elif p1 == '3' , p2 == '1': print('when mix yellow , red, orange') elif p1 == '2' , p2 == '3': print('when mix blue , yellow, green') else: print('you didnt input 2 primary colors.')
it seems you're using python 2.x. replace occurrences of input raw_input , achieve goal.
Comments
Post a Comment