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

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -