Count down from n
Implement a function that returns a list from n down to 1.
Multiplication Table Row
Return the nth row of a multiplication table as a list of 1..n products.
Last Occurrence of a Value
Implement a function that returns the last index of a given value in a list, or -1 if it's not present.
Cycle a List Once
Implement a function that rotates a list right by one position.
Boolean Mask Filter
Write a function that filters a list based on a boolean mask and returns the selected elements.
Replace negatives with zero
Implement a function that replaces all negative numbers in a list with zero.
Average of a list
Write a function that computes the average of a list of numbers, handling empty lists by returning 0.
Map, Filter, Reduce
Implement three functions using map, filter, and reduce to manipulate a list of integers.
Count Leading Zeros
Write a function that returns the number of leading zeros in a list of integers.
Remove Duplicates from Sorted Array
Given a sorted list, remove duplicates in-place and return the new length.
Filter by Age
Filter a list of person dictionaries by age and return their names.
Insert New Row
Implement a function that inserts a new row into a 2D list at a specified index.
Rank Employees by Salary
Sort a list of employee dictionaries by salary descending, tie-break by name, and return ranked strings.
Broadcast Add Scalar
Add a scalar to every number in a 2D list and return a new 2D list without modifying the original.
Fancy Index Select
Given a 2D matrix and a list of row indices, select those rows in order and return them as a new 2D list.
Reshape array dimensions
Implement a function that reshapes a 1D list into a 2D list with given dimensions.
Cumulative Sum Vectorized
Implement a function that returns the cumulative sum of a list of numbers.
Element-wise Clip
Implement a function that clips each element of a list to a specified range.
Percentile Calculation
Given a list of numbers and a target value, return the percentile rank of that value in the list.
Euclidean Distance Matrix
Write a function to compute the Euclidean distance between every pair of points from two lists.
Order by Name
Implement a function that sorts a list of names alphabetically ignoring case, returning a new list.
Argmax along axis
Write a function that returns index positions of the maximum values along rows or columns of a 2D list.
Safe Command Executor
Implement emulate_run that simulates running a command list and returns output and exit code.
Parse coordinate pairs
Parse a string of coordinate pairs into a list of coordinate lists.
Showing 1–24 of 116 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
- Pick a category — basics, algorithms, strings, and more
- Open a challenge, read the statement, and edit the starter code
- 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.