Docsity

Color Mixer in Python, Thesis of Marketing Business-to-business (B2B)

Partial preview of the text

Download Color Mixer in Python and more Thesis Marketing Business-to-business (B2B) in PDF only on Docsity!

Color Mixer CPT 200 Fundamentals of Programming Languages script pri_clr_list = ['blue', 'red', 'yellow'];
userColor1 = str(input("Pick a color: blue, red, or yellow. ")); \

userColor2 = str(input("Pick another color: blue, red, or yellow. ")) if userColor1 == 'blue' and userColor2 == 'red': print ('You have created the color Purple') elif userColor1 == 'red' and userColor2 == 'yellow': print ('You have created the color Orange!') elif userColor1 == 'blue' and userColor2 == 'yellow': print ('You have created the color Green') elif userColor1 == 'red' and userColor2 == 'blue': print ('You have created the color Purple') elif userColor1 == 'yellow' and userColor2 == 'red': print ('You have created the color Orange') elif userColor1 == 'yellow' and userColor2 == 'blue': print ('You have created the color Green') else: print ("Nope, try a different combo") This was a cool assignment. Firstly, I used the official Python compiler, more specifically its IDLE under a new file so that I could manipulate the script more easily without executing or compiling prematurely. The first part is to generate user’s input from selected groups, in this case