Practice Arena

Python Coding Challenges

Write real Python in the browser. Instant feedback. From beginner to expert.

925 challenges 556 easy 323 medium 46 hard
Advanced Python medium

2D Vector dataclass

Implement a Vector2D dataclass with +, -, scalar *, dot product, and magnitude.

dataclass OOP math
1
+20 pts 18m
Advanced Python hard

Data pipeline

Implement a Pipeline class supporting pipe chaining with the | operator.

functional OOP pipeline
1
+40 pts 35m
Advanced Python hard

Validated descriptor

Implement a TypedField descriptor that raises TypeError if the value is not of the expected type.

descriptors OOP metaclass
+40 pts 35m
Advanced Python medium

Metaclass Registry

Implement a metaclass that automatically registers every subclass in a class-level registry.

metaclass registry oop
+25 pts 25m
Advanced Python medium

Descriptor Property

Create a descriptor class that ensures attribute values are positive integers.

descriptors oop python-advanced
+20 pts 20m
Error Handling & Exceptions easy

Validation result object

Implement a ValidationResult class that tracks validation errors and can report validity.

validation error-handling oop
+8 pts 15m
Math & Number Theory easy

Sieve of Eratosthenes

Implement the Sieve of Eratosthenes to return a sorted list of all primes up to a given integer n.

primes sieve loops
+10 pts 15m
Math & Number Theory easy

Prime Factorization

Return a sorted list of prime factors of a positive integer, including repeated factors.

prime math loops
+10 pts 15m
Math & Number Theory easy

Happy number check

Implement a function that returns True if a number is happy, False otherwise.

math loops set
+8 pts 12m
Greedy Algorithms medium

Gas Station Circuit

Given gas and cost arrays for a circular route, determine the starting gas station index that allows a full loop, or -1 if none exists.

greedy arrays circular
+25 pts 20m
Matrix & 2D Arrays easy

Matrix Multiply 2D

Write a function that multiplies two 2D matrices (lists of lists) and returns the product matrix.

matrix multiplication nested-loops
+8 pts 10m

Showing 49–59 of 59 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

  1. Pick a category — basics, algorithms, strings, and more
  2. Open a challenge, read the statement, and edit the starter code
  3. 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.