The Ship Teams
The Hypercube is located in the very center of the castle, built by the eccentric Lord Escher a couple of centuries ago. This man built his castle on the island due to his high appreciation for the solitude. Ever since he died (under the very mysterious circumstances), and his servants who have returned to the continent told the world about the strange things and phenomena happening there, many of the research expeditions and groups of treasure hunters went there. But none of them have ever returned...
Good luck, buddy! Perhaps you are bound to have more luck than others.
So, the things are packed, equipment gathered and it's high time to hit the road. Currently you are on the continent, standing in the port. Foreseeing the danger you might be facing on the island, you’ve decided not to go there alone, but to recruit a team and equip 2 ships. Your only goal is to get hold of a Cube, the other treasures that you are hoping to find will be considered the payment for the team.
And the first task is simple - you have to divide all your crew members into 2 teams (for the 2 ships).
You have to divide all your crew members into 2 teams with the next rules: those who are elder than 40 y.o. or younger than 20, should be on the first ship and all the others - on the second. It will helps the young sailors gain the experience of the elder collegues. The input data will be the dictionary where keys will be the surnames of the sailors and the values will be their ages. After the crew formating, you should sort all of the sailors in the alphabetical order in the each list of surnames.
Input: Dictionary with the sailors and their ages.
Output: List of the lists with 2 teams.
Example:
two_teams({ 'Smith': 34, 'Wesson': 22, 'Coleman': 45, 'Abrahams': 19}) == [ ['Abrahams', 'Coleman'], ['Smith', 'Wesson'] ]
How it is used: For splitting objects to the few roughly equivalent groups.
Precondition:
1 <= amount of the sailors <= 100
CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.
In order to install CheckiO client you'll need installed Python (version at least 3.8)
Install CheckiO Client first:
pip3 install checkio_client
Configure your tool
checkio --domain=py config --key=
Sync solutions into your local folder
checkio sync
(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)
checkio serv -d
Alternatevly, you can install Chrome extension or FF addon
checkio install-plugin
checkio install-plugin --ff
checkio install-plugin --chromium
Read more here about other functionality that the checkio client provides. Feel free to submit an issue in case of any difficulties.
Welcome to Pair Programming! Engage in real-time collaboration on coding projects by starting a session and sharing the provided unique URL with friends or colleagues. This feature is perfect for joint project development, debugging, or learning new skills together. Simply click 'Start Session' to begin your collaborative coding journey!
You are trying to join a pair programming session that has not started yet.
Please wait for the session creator to join.
It looks like the creator of the pair programming session closed the editor window.
It might happen accidentally, so that you can wait for reconnection.