Nice Colors Only! Easy

+50 PTS

Before you start the test, check out our tutorial challenge

  • TYPE CODE PRACTICE CHALLENGE
  • LANGUAGES JAVASCRIPT, PHP, PYTHON, PYTHON2 AND 3 MORE
    LANGUAGES JAVASCRIPT, PHP, PYTHON, PYTHON2, RUBY, SWIFT, TYPESCRIPT
  • TIME ~10MIN

Nice Colors Only!

Challenge overview

Hello and welcome to the challenge!


Write a code that deletes all not nice color names from the given string array. And the not nice colors are (of course) gray, purple and yellow. All others are nice (it should be obvious, isn't it?).

Input

  • the array with lowercased color names as strings

Output

  • the given array with not nice colors filtred out

Constraints

  • 0 < length of the given array < 1000
  • 0 < max length of strings included in the given array < 100


You can solve this programming contest in Ruby, JavaScript, Python and many other languages. If you want, you can also take part in other November 2019 competitions. Below you can find some of them:



Have fun and good luck! :)