Question: 2 0 . 5 . 2 : Complete the method that looks up a color name and returns the color code. 5 9 7 7
: Complete the method that looks up a color name and returns the color code.
qxzqy
You are given a map with color names and codes, such as:
"red" #FF "tomato" #FF
Complete the method below that, given any string and such a map, looks up the color code, or returns the original string if it is not a key of the map.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
