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
Python Basics easy

Compound interest

Return the future balance after compound interest, rounded to two decimals.

math functions finance
+12 pts 12m
Python Basics easy

Grade from Score

Write a function that maps a numeric score to its letter grade using standard grading thresholds.

conditionals functions integers
+8 pts 10m
Python Basics easy

Grade Calculator

Implement a function that converts a numeric score to a letter grade using a standard scale.

conditionals functions basic-syntax
+8 pts 10m
Python Basics easy

Map, Filter, Reduce

Implement three functions using map, filter, and reduce to manipulate a list of integers.

map filter reduce
+10 pts 15m
Python Basics easy

Variadic Sum Function

Implement a variadic function that sums an arbitrary number of numeric arguments.

functions args sum
+10 pts 10m
Python Basics easy

Guess Number Game

Simulate a number guessing game with attempts, feedback, and a win/lose result.

loops conditionals functions
+10 pts 15m
Python Basics easy

Invariant checker

Implement check_invariant(a, b, c) that returns True when a equals b plus c and False otherwise, matching the given examples.

functions conditionals validation
+8 pts 10m
Functions & Closures easy

Bind First Argument

Implement bind_first_arg, a decorator that fixes the first argument of any function.

decorators closures functions
+10 pts 15m
OOP & Classes medium

Reentrant Lock Manager

Implement a ReentrantLock class with acquire, release, locked, owner, and helper functions that test thread-safety with real threads.

threading locking reentrant
+20 pts 20m
Data Structures & Algorithms hard

LRU cache decorator

Implement @lru_cache(maxsize=N) for unary functions using OrderedDict.

decorators caching OrderedDict
1
+50 pts 40m
Advanced Python medium

TypeVar bounded generic

Learn to use TypeVar with bounds to write type-safe generic functions in Python.

generics typevar typing
+20 pts 15m
Decorators & Context Managers easy

Once Decorator: Run a Function Only Once

Implement a decorator that caches and returns the result of the first call for subsequent calls.

decorators closures caching
+8 pts 10m
Decorators & Context Managers easy

Print Args Decorator

Write a decorator that prints function name and arguments, then returns the original result.

decorators functions wrappers
+10 pts 10m
Bit Manipulation medium

Bit Mask Permissions

Implement helper functions to compose bit masks and check permission bits using bitwise operators.

bitwise bitmasks permissions
+15 pts 20m
Datetime & Time Calculations medium

Julian Day Number Converter

Implement two functions to convert between Gregorian calendar dates and Julian Day Numbers using a standard formula.

datetime date-arithmetic algorithms
+20 pts 20m
Data Formats & Parsing medium

Base64 Encode/Decode

Implement two functions to encode and decode Base64 strings using the standard alphabet and padding.

base64 encoding string
+20 pts 20m
Data Formats & Parsing medium

Base64 Encode Decode

Implement Base64 encoding and decoding functions that handle padding and all standard characters.

base64 encoding decoding
+20 pts 30m
SQL & SQLite easy

Cumulative Sum SQL

Write a SQL query to compute cumulative sales totals per product ordered by sale date.

sql window-functions running-total
+8 pts 12m

Showing 1–18 of 18 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.