Count word occurrences
Write a function that takes a sentence and returns a dictionary of word counts.
Parse key=value pairs
Implement a parser that converts a space-separated 'key=value' string into a Python dictionary, supporting quoted values.
Merge dicts summing values
Write a function that merges two dictionaries by summing values for duplicated keys.
Group names by first letter
Given a list of names, return a dictionary mapping each first letter to all names starting with that letter in original order.
Missing keys default zero
Write a function to sum numeric values from dictionaries, treating missing keys as zero.
Keys Sorted by Value Descending
Given a dictionary mapping strings to integers, return a list of keys sorted by value descending, and when values tie, alphabetically ascending.
Common Keys of Two Dictionaries
Implement a function that finds keys shared by two dictionaries and returns them sorted.
Mode of a list via counting
Implement a function that returns the mode of a list, resolving ties by the element that appears first.
Sort by frequency
Sort a list by element frequency descending, with ties broken by order of first occurrence.
Showing 9 challenges · easy
Guide: free Python coding challenges
Practice Python by solving problems
PythonSkillset challenges are hands-on coding exercises from beginner to advanced. Open a challenge, read the problem, write Python in the split-pane editor, and run tests with Pyodide — no install required.
How to use the arena
- Pick a category — basics, algorithms, strings, and more
- Open a challenge, read the statement, and edit the starter code
- Run tests, fix failures, then try a related quiz or tutorial lesson
Challenges vs tutorials and quizzes
Challenges test what you can build under constraints. For guided teaching, use our Python tutorials. For quick checks, try quizzes or copy snippets from code samples.