7 kyu
Guess My Number
Description:
Your Goal is to create a function that takes two strings, a guess and a phone number.
Based on the guess, the function should display a portion of the phone number:
guess_my_number('052', '123-451-2345')
would return the string: '#2#-#5#-2##5'
or
guess_my_number('142', '123-451-2345')
would return the string: '12#-4#1-2#4#'
Order of the guess string should not matter, and should not have duplicates of the ten digitis 0-9. Guess will never be an empty string or contains any other charachters. The phone number will always bea ten digit number in the format ###-###-####.
The default number of 123-451-2345 should be included, but can be overwriten by a different number if supplied at the time of execution.
Fundamentals
Similar Kata:
Stats:
Created | Nov 24, 2015 |
Published | Nov 24, 2015 |
Warriors Trained | 773 |
Total Skips | 30 |
Total Code Submissions | 890 |
Total Times Completed | 494 |
Python Completions | 494 |
Total Stars | 9 |
% of votes with a positive feedback rating | 89% of 138 |
Total "Very Satisfied" Votes | 111 |
Total "Somewhat Satisfied" Votes | 24 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 19 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |