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
SQL & SQLite medium

Nth Highest Salary

Write a Python function using SQLite to return the Nth highest distinct salary from an employee table.

sql sqlite aggregation
+20 pts 20m
Numpy & Vectorized Computing medium

Flatten matrix to vector

Read rows left-to-right, top-to-bottom.

vectors arrays numpy-style
+22 pts 20m
Numpy & Vectorized Computing medium

Square each element

Return element-wise squares.

vectors arrays numpy-style
+22 pts 20m
Numpy & Vectorized Computing medium

Absolute value per element

Return element-wise absolute values.

vectors arrays numpy-style
+22 pts 20m
Numpy & Vectorized Computing medium

Keep positive elements

Return values strictly greater than zero.

vectors arrays numpy-style
+22 pts 20m
Numpy & Vectorized Computing medium

Prefix sum vector

Return running totals for each prefix of the vector.

vectors arrays numpy-style
+22 pts 20m
Numpy & Vectorized Computing medium

Element-wise multiply

Multiply corresponding elements.

vectors arrays numpy-style
+22 pts 20m
Numpy & Vectorized Computing medium

Count non-zero entries

Count elements not equal to zero.

vectors arrays numpy-style
+22 pts 20m
Numpy & Vectorized Computing medium

Reverse vector order

Return elements in opposite order.

vectors arrays numpy-style
+22 pts 20m
Numpy & Vectorized Computing medium

Transpose a matrix

Swap rows and columns for a rectangular matrix.

vectors arrays numpy-style
+22 pts 20m
Numpy & Vectorized Computing medium

L2 norm of vector

Return Euclidean length.

vectors arrays numpy-style
+22 pts 20m

Showing 313–323 of 323 challenges · medium

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.