Sum of digits
Return the sum of all decimal digits of a non-negative integer.
Collatz steps
Count how many steps the Collatz sequence takes to reach 1 from n.
Factorial (iterative)
Compute n! iteratively without recursion.
Prime checker
Return True if n is a prime number.
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.
Digit count of an integer
Given an integer, return the number of digits it has, handling negatives and zero correctly.
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.
Count Multiples in a Range
Given a start, end, and divisor, count how many integers in [start, end] are divisible by the divisor.
Countdown printer
Implement a function that prints a countdown from a given number down to 1, then returns 'Go!'.
Count Positives
Count the positive numbers in a list of integers.
Print Pyramid Pattern
Implement a function that returns a centered asterisk pyramid as a list of strings.
Digit Count
Count the number of digits in an integer using arithmetic, without string conversion.
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.
Enumerate with start
Implement a function that mimics Python's enumerate with a custom start index.
Hexagonal Number
Write a function to check if a positive integer is a hexagonal number.
Count trailing zeros
Write a function that counts the number of trailing zeros in the decimal representation of a positive integer.
Remove Consecutive Duplicate Letters
Implement a function that removes consecutive duplicate letters from a string, keeping only one occurrence of each run.
Interleave Two Strings
Given two strings s1 and s2, return a new string that interleaves them character by character, starting with s1.
Count consonants
Write a function that counts the number of consonant letters in a string.
Count Syllables (Simple)
Count syllables in a word by counting groups of consecutive vowels (a, e, i, o, u).
Expand compressed string
Implement a function that expands run-length encoded strings (e.g., 'a3b2' → 'aaabb').
Generate a Multiplication Table
Build a function that returns an n x n multiplication table as a list of lists.
Sieve of Eratosthenes
Implement the Sieve of Eratosthenes to return a sorted list of all primes up to a given integer n.
Prime Factorization
Return a sorted list of prime factors of a positive integer, including repeated factors.
Happy number check
Implement a function that returns True if a number is happy, False otherwise.
Showing 27 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.