Collatz steps
Count how many steps the Collatz sequence takes to reach 1 from n.
Replace multiple spaces
Implement a function that replaces every sequence of spaces with a single space.
Shell Sort
Implement Shell sort, an in-place comparison sort that generalizes insertion sort, using a gap sequence that shrinks by half each pass.
Window Iterator
Implement a generator that yields consecutive windows of a given size from any iterable.
Pairwise Sequence Pairs
Write a generator function pairwise that yields each consecutive overlapping pair from any iterable as lists.
Collatz Generator
Implement a generator function that yields the Collatz sequence starting from a given positive integer.
Power set size
Compute the size of the power set of a given sequence.
Lucas Sequence
Implement a function to compute the n-th Lucas number using iteration or recursion with memoization.
Binary Search Tree Class
Build a BinarySearchTree class and a sequence runner that executes a list of operations.
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.