Answered You can hire a professional tutor to get the answer.

QUESTION

Write method/function that takes a string and counts how many colors are used in that string. For the purposes of our challenge, let's say that the...

Write method/function that takes a string and counts how many colors are used in that string. For the purposes of our challenge, let's say that the only available colors are: blue, green, brown, gray, red, black, and purple.

Example:

color_counter('the quick brown fox jumped over the purple dog') 

# returns 2 because the string has two of the colors in it

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question