Rearrange Positives and Negatives
Write a function that rearranges a list in-place so all negative numbers come before non-negative numbers.
Two Missing Numbers
Given a list of n-2 unique integers from 1 to n, find the two missing numbers efficiently.
Three Missing Numbers
Find the three missing numbers from a shuffled list containing all but three integers from 1 to n.
Count Smaller Numbers
Given an integer list, return for each position how many later elements are smaller than it.
Normalize Array to Zero-One Range
Implement a function that normalizes a list of numbers to the range [0,1] using min-max scaling.
Rolling Window Mean
Given a list of numbers and a window size k, return a list of the means of every contiguous subarray of length k.
Values that appear once
Return a list of numbers that appear exactly once in the input list, in original order.
Two Sum with Dict
Implement the classic Two Sum problem: return indices of two numbers that add up to a target using a dict.
Count inversions lite
Implement a function that counts inversions in a list of numbers efficiently.
Bubble Sort
Implement bubble sort that sorts a list of numbers in ascending order.
Selection Sort Implementation
Implement selection sort to sort a list of numbers in ascending order.
Merge Sort
Implement merge_sort(numbers) that returns a sorted copy of the input list using the merge sort algorithm.
Bucket Sort
Implement bucket sort to sort a list of floating-point numbers in the range [0,1).
Strobogrammatic number II
Given a positive integer n, return all strobogrammatic numbers of length n in ascending order.
Multiprocessing Queue
Implement a function that uses a multiprocessing queue to compute factorials of a list of numbers in parallel.
Generator Pipeline
Implement a generator function that yields only even numbers from an input list, squared.
Range-like generator
Implement a custom generator that yields numbers like Python's range but with flexible bounds.
Fibonacci Generator
Create a generator function that yields Fibonacci numbers from 0 upward until a given limit.
Prime Sieve Generator
Implement a generator function that yields prime numbers from 2 up to a specified limit, using an efficient sieve approach.
Iterator protocol class
Implement a class that follows the iterator protocol and yields squared numbers up to a given limit.
Divide with zero check
Write a function that safely divides two numbers, catching division by zero.
Else on try block
Implement a function that uses try-except-else to safely divide two numbers and return a result or error description.
Stirling number
Implement a function to compute Stirling numbers of the second kind S(n,k).
Amicable Numbers Check
Write a function that checks if two numbers are an amicable pair by comparing sums of proper divisors.
Showing 25–48 of 60 challenges
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.