6 kyu
Exclamation marks series #15: Replace the pair of exclamation marks and question marks to spaces
82 of 153myjinxin2015
Description:
Description:
Replace the pair of exclamation marks and question marks to spaces(from the left to the right). A pair of exclamation marks and question marks must has the same number of "!" and "?".
That is: "!" and "?" is a pair; "!!" and "??" is a pair; "!!!" and "???" is a pair; and so on..
Examples
replace("!!") === "!!"
replace("!??") === "!??"
replace("!?") === " "
replace("!!??") === " "
replace("!!!????") === "!!!????"
replace("!??!!") === "! "
replace("!????!!!?") === " ????!!! "
replace("!?!!??!!!?") === " !!!?"
Fundamentals
Similar Kata:
Stats:
Created | Oct 10, 2016 |
Published | Oct 10, 2016 |
Warriors Trained | 497 |
Total Skips | 14 |
Total Code Submissions | 820 |
Total Times Completed | 153 |
JavaScript Completions | 82 |
Python Completions | 81 |
Total Stars | 24 |
% of votes with a positive feedback rating | 92% of 73 |
Total "Very Satisfied" Votes | 64 |
Total "Somewhat Satisfied" Votes | 7 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 9 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |