Max of a variable-length list
Implement a function that returns the maximum value from a list of numbers without using max().
Max of three numbers
Implement a function that returns the maximum of three numbers using comparisons.
Range of values
Calculate the range (max minus min) of a list of numbers. Empty list returns 0.
Argmax along axis
Write a function that returns index positions of the maximum values along rows or columns of a 2D list.
Min-Max Scaler: Fit and Transform
Implement a MinMaxScaler class that normalizes numeric data to a given range using fit and transform methods.
Longest Word Finder
Write a function that extracts alphabetic words from a string and returns the longest one, with ties broken by earliest position.
Running Maximum
Implement a function that returns a list where each element is the largest value seen so far.
Average excluding min and max
Return the average of a list after discarding the lowest and highest elements, handling edge cases.
Find Second Largest
Find the second largest unique number in a list, or None if it doesn't exist.
Normalize Array to Zero-One Range
Implement a function that normalizes a list of numbers to the range [0,1] using min-max scaling.
Longest Harmonious Subsequence
Given a list of integers, find the length of the longest harmonious subsequence where the difference between maximum and minimum values is exactly 1.
House Robber
Given a list of house values, return the maximum sum you can rob without robbing two adjacent houses.
Maximum depth of tree
Implement max_depth(root) to return the maximum depth of a binary tree.
Stock Buy Sell Once
Given daily stock prices, compute the maximum profit you can achieve from buying once and selling once later.
Assign Cookies
Given child greed factors and cookie sizes, return the maximum number of content children.
Maximize units on truck
Given box types with count and units per box, maximize total units loaded onto a truck.
Maximum Ice Cream Bars
Given costs of ice cream bars and coins, return the maximum number you can buy.
Best Time to Buy and Sell Stock
Given a list of daily stock prices, determine the maximum profit achievable by buying on one day and selling on a later day.
Container With Most Water
Compute the maximum area between two vertical lines in an array of heights.
Max Stack Design
Implement a MaxStack class with push, pop, top, and get_max operations.
Maximum node value
Return the largest integer or None when empty.
Maximum element in vector
Return largest value or None when empty.
Min-max normalize vector
Scale values to 0..1; equal values become all 0.0.
Showing 1–23 of 23 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
- 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.