7 kyu
Slaphead
1,195 of 2,760PG1
Description:
Being a bald man myself, I know the feeling of needing to keep it clean shaven. Nothing worse that a stray hair waving in the wind.
You will be given a string(x). Clean shaved head is shown as "-" and stray hairs are shown as "/". Your task is to check the head for stray hairs and get rid of them.
You should return the original string, but with any stray hairs removed. Keep count ot them though, as there is a second element you need to return:
0 hairs --> "Clean!"
1 hair --> "Unicorn!"
2 hairs --> "Homer!"
3-5 hairs --> "Careless!"
>5 hairs --> "Hobo!"
So for this head: "------/------" you shoud return:
["-------------", "Unicorn"]
Fundamentals
Strings
Arrays
Stats:
Created | Oct 1, 2016 |
Published | Oct 1, 2016 |
Warriors Trained | 3902 |
Total Skips | 49 |
Total Code Submissions | 9258 |
Total Times Completed | 2760 |
JavaScript Completions | 1195 |
C# Completions | 271 |
Ruby Completions | 170 |
Python Completions | 992 |
Haskell Completions | 59 |
Julia Completions | 11 |
Crystal Completions | 6 |
CoffeeScript Completions | 10 |
C++ Completions | 154 |
Total Stars | 28 |
% of votes with a positive feedback rating | 90% of 554 |
Total "Very Satisfied" Votes | 457 |
Total "Somewhat Satisfied" Votes | 79 |
Total "Not Satisfied" Votes | 18 |
Total Rank Assessments | 8 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |