Factorial (iterative)
Compute n! iteratively without recursion.
Clamp a Number to a Range
Implement a clamp function that returns a value within a specified range.
Max of a variable-length list
Implement a function that returns the maximum value from a list of numbers without using max().
Replace negatives with zero
Implement a function that replaces all negative numbers in a list with zero.
Minutes to Hours: Time Conversion Helper
Write a function that converts minutes into a human-readable 'Xh Ym' string, with special cases for zero and whole hours.
Is divisible by?
Create a function that returns True if a is divisible by b with no remainder, with a clear definition of edge cases.
Modulo Remainder
Implement a function that returns the remainder of a divided by b without using the modulo operator.
Digit Count
Count the number of digits in an integer using arithmetic, without string conversion.
Find Missing Number
Given a list of n distinct integers from 0..n with one missing, return the missing number.
Enumerate with start
Implement a function that mimics Python's enumerate with a custom start index.
Convolve 1D signal
Implement a 1D convolution function with three modes using pure Python.
Guess Number Game
Simulate a number guessing game with attempts, feedback, and a win/lose result.
Longest Substring with K Repeating Characters
Return the length of the longest substring of a given string in which every character appears at least K times.
Basic Calculator
Implement a function that evaluates a simple arithmetic expression with +, -, *, / and parentheses.
Broadcast Add Scalar
Add a scalar to every number in a 2D list and return a new 2D list without modifying the original.
Reshape array dimensions
Implement a function that reshapes a 1D list into a 2D list with given dimensions.
Title case converter
Return the string with each word capitalised.
Longest word in a sentence
Write a function that returns the longest word from a sentence, with first-occurrence tie-breaking.
Replace vowels with stars
Write a function that replaces every vowel in a given string with an asterisk.
Normalize quotes
Replace all typographic quote characters with straight ASCII quotes.
Interleave Two Strings
Given two strings s1 and s2, return a new string that interleaves them character by character, starting with s1.
Center a string in a width
Write a function that centers a string within a specified width by adding spaces on both sides.
Remove Duplicates from String
Given a string, return a new string with each character that repeats consecutively reduced to a single occurrence.
Longest Word Finder
Write a function that extracts alphabetic words from a string and returns the longest one, with ties broken by earliest position.
Showing 1–24 of 191 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.