7 kyu
Player Contact Manager
500 of 961IanEarley
Description:
You are the Dungeon Master for a public DnD game at your local comic shop and recently you've had some trouble keeping your players' info neat and organized so you've decided to write a bit of code to help keep them sorted!
The goal of this code is to create an array of objects that stores a player's name and contact number from a given string.
The method should return an empty array if the argument passed is an empty string or nil
/None
/null
.
Examples
player_manager("John Doe, 8167238327, Jane Doe, 8163723827") returns [{player: "John Doe", contact: 8167238327}, {player: "Jane Doe", contact: 8163723827}]
player_manager(nil) returns []
player_manager("") returns []
playerManager("John Doe, 8167238327, Jane Doe, 8163723827") returns [{player: "John Doe", contact: 8167238327}, {player: "Jane Doe", contact: 8163723827}]
playerManager(null) returns []
playerManager("") returns []
Have at thee!
Arrays
Similar Kata:
Stats:
Created | Jun 12, 2018 |
Published | Jun 12, 2018 |
Warriors Trained | 1610 |
Total Skips | 13 |
Total Code Submissions | 5465 |
Total Times Completed | 961 |
Ruby Completions | 95 |
Python Completions | 394 |
JavaScript Completions | 500 |
Total Stars | 20 |
% of votes with a positive feedback rating | 91% of 265 |
Total "Very Satisfied" Votes | 221 |
Total "Somewhat Satisfied" Votes | 39 |
Total "Not Satisfied" Votes | 5 |
Total Rank Assessments | 8 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |