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

Cosine Similarity of Vectors

Compute the cosine similarity between two equal-length numeric vectors using pure Python.

math linear-algebra similarity
+10 pts 15m
Lists & Arrays easy

One Hot Encode Labels

Given a list of categorical labels, return a list of one-hot encoded vectors based on the sort order of unique labels.

lists encoding matrices
+10 pts 10m
Math & Number Theory easy

Dot Product of Vectors

Implement a function that returns the dot product of two numeric vectors.

math lists dot-product
+10 pts 10m
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

Showing 1–13 of 13 challenges · easy

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.