Login and get codingGiven the provided
cars
dictionary:
- Get all Jeeps
- Get the first car of every manufacturer.
- Get all vehicles containing the string Trail in their names (should work for other grep too)
- Sort the models (
values
) alphabeticallySee the docstrings and tests for more details. Have fun!
Update 18th of Sept 2018: as concluded in the forum it is better to pass the cars dict into each function to make its scope local.
Update 9th of March 2022: doing this exercise again ourselves today, we concluded that adding type hints would be quite beneficial here so we added them.
1564 out of 1678 users completed this Bite.
Will you be the 1565th person to crack this Bite?
Resolution time: ~57 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 5.33 on a 1-10 difficulty scale.
» Up for a challenge? 💪