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

Enumerate with start

Implement a function that mimics Python's enumerate with a custom start index.

enumerate loops tuples
+5 pts 5m
Python Basics easy

Palindromic Number Check

Write a function to check if a given integer is a palindrome.

numbers strings conditionals
+10 pts 10m
Python Basics easy

Hexagonal Number

Write a function to check if a positive integer is a hexagonal number.

math loops conditionals
+10 pts 15m
Python Basics easy

Count trailing zeros

Write a function that counts the number of trailing zeros in the decimal representation of a positive integer.

loops integers basics
+5 pts 5m
Python Basics easy

Count Leading Zeros

Write a function that returns the number of leading zeros in a list of integers.

lists iteration counting
+8 pts 8m
Python Basics easy

Convolve 1D signal

Implement a 1D convolution function with three modes using pure Python.

convolution arrays loops
+8 pts 12m
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 medium

Basic Calculator

Implement a function that evaluates a simple arithmetic expression with +, -, *, / and parentheses.

calculator parsing math
+20 pts 25m
Python Basics easy

Copy deep vs shallow

Predict and write a function that returns a copied list and inspect whether nested modification affects the original.

copy nested mutation
+8 pts 10m
Python Basics easy

Limit and Offset Query

Write a function that returns a page from a dataset given limit and offset.

pagination list slicing
+8 pts 10m
Python Basics easy

Insert New Row

Implement a function that inserts a new row into a 2D list at a specified index.

lists insert rows
+5 pts 5m
Python Basics easy

Array mean and std

Implement the function array_stats that returns the mean and population standard deviation of a list of numbers.

statistics mean std
+10 pts 15m
Python Basics easy

Reshape array dimensions

Implement a function that reshapes a 1D list into a 2D list with given dimensions.

reshape matrix lists
+8 pts 10m
Python Basics easy

Cumulative Sum Vectorized

Implement a function that returns the cumulative sum of a list of numbers.

lists cumulative sum
+10 pts 10m
Python Basics easy

Element-wise Clip

Implement a function that clips each element of a list to a specified range.

clipping lists conditionals
+8 pts 10m
Python Basics easy

Euclidean Distance Matrix

Write a function to compute the Euclidean distance between every pair of points from two lists.

math lists loops
+10 pts 15m
Python Basics easy

Order by Name

Implement a function that sorts a list of names alphabetically ignoring case, returning a new list.

sorting strings lists
+10 pts 10m
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
Python Basics easy

Argmax along axis

Write a function that returns index positions of the maximum values along rows or columns of a 2D list.

lists max index
+10 pts 10m
Python Basics easy

Validate Password Strength

Implement a function that validates password strength based on clear rules.

strings validation conditions
+10 pts 15m
Strings & Text easy

Strip and Collapse Whitespace

Write a function that strips leading/trailing whitespace and collapses inner runs of whitespace to single spaces.

strings whitespace normalization
+10 pts 15m
Strings & Text easy

Snake case to camel case

Implement a function that converts snake_case strings to camelCase.

strings case-conversion text-processing
+10 pts 10m
Strings & Text easy

Camel case to snake case

Write a function that converts camelCase input to snake_case while handling acronyms and numbers correctly.

strings case-conversion parsing
+10 pts 15m
Strings & Text easy

Remove punctuation

Write a function that removes all ASCII punctuation characters from a string.

strings punctuation cleaning
+10 pts 10m

Showing 49–72 of 365 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.