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.
Max of a variable-length list
Implement a function that returns the maximum value from a list of numbers without using max().
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.
Count Positives
Count the positive numbers in a list of integers.
Find Minimum Value
Write a function that returns the minimum integer from a given list.
Range of values
Calculate the range (max minus min) of a list of numbers. Empty list returns 0.
Print Pyramid Pattern
Implement a function that returns a centered asterisk pyramid as a list of strings.
Find Missing Number
Given a list of n distinct integers from 0..n with one missing, return the missing number.
Map, Filter, Reduce
Implement three functions using map, filter, and reduce to manipulate a list of integers.
Linear Search Implementation
Implement a linear search function that returns the index of the first occurrence of a target in a list, or -1 if not found.
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.
Copy deep vs shallow
Predict and write a function that returns a copied list and inspect whether nested modification affects the original.
Take n Items
Given a list and a non-negative integer n, return a new list containing the first n elements.
Filter by Age
Filter a list of person dictionaries by age and return their names.
Limit and Offset Query
Write a function that returns a page from a dataset given limit and offset.
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.
Array mean and std
Implement the function array_stats that returns the mean and population standard deviation of a list of numbers.
Showing 1–24 of 273 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.