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
Numpy & Vectorized Computing easy

Element-wise vector addition

Add equal-length numeric lists element-wise.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Scale a vector by scalar

Multiply every element by k.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Dot product of two vectors

Return sum of element-wise products.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Mean of a vector

Return arithmetic mean or 0.0 when empty.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Maximum element in vector

Return largest value or None when empty.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Minimum element in vector

Return smallest value or None when empty.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Clip vector to range

Clamp each value to [lo, hi].

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Min-max normalize vector

Scale values to 0..1; equal values become all 0.0.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Sum each matrix row

Given rows, return each row sum.

vectors arrays numpy-style
+10 pts 12m
Numpy & Vectorized Computing easy

Sum each matrix column

Return column totals for a rectangular matrix.

vectors arrays numpy-style
+10 pts 12m
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
Numpy & Vectorized Computing hard

Index of maximum value

Return index of largest value (first on tie).

vectors arrays numpy-style
+35 pts 30m
Numpy & Vectorized Computing hard

Add scalar to vector

Add constant k to every element of the vector.

vectors arrays numpy-style
+35 pts 30m
Numpy & Vectorized Computing hard

Inclusive numeric range vector

Return [start, start+step, ...] through end inclusive.

vectors arrays numpy-style
+35 pts 30m
Numpy & Vectorized Computing hard

Count elements in matrix

Return total scalar count.

vectors arrays numpy-style
+35 pts 30m

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