-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcolordictionary_ps_starter_code.py
More file actions
43 lines (25 loc) · 1.14 KB
/
colordictionary_ps_starter_code.py
File metadata and controls
43 lines (25 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#Starter code for color dictionary
# December 21, 2012 - Mayan Calendar ended and the world should have to
#Hey we are still arround :)
# Color Dictionary
# You would look up color values by the color and not by an inedx
#It is easier to catagorize the R G B values by color than index in a list
# you could use a nested list but this is where a dictionary is very useful
# Variable List:
# colors - the dictionary of colors and there values
print ("Welcome to The Dark Knight Program \n\n")
# creates the dictionary: key color -- value R G B values
colors = {"Red": (255,0,0),
"Green": (0,255,0),
"Blue": (0,0,255)
"Orange": (255,128,0)
"Purple": (153,51,255)}
#Ask the user for a color
Acolor = input("What Color are you looking for?")
# Display the R G B values if it is in the list
# If the Color is NOT in the list ask for the R G B values
# add it to the dictionary of Colors
# Ask the user if they need to look up more colors
#Display the entire dictionary in 2 columns
#Color Key R G B values
input("\n\nPress enter to exit.")