GCD via Euclid
Compute the greatest common divisor of two positive integers.
Clamp a Number to a Range
Implement a clamp function that returns a value within a specified range.
Min of three numbers
Write a function that returns the minimum of three integers.
Sign of a Number
Write a function that returns the sign of a number as a string.
Is a multiple of both
Write a function that returns True if a number is divisible by both of two given divisors.
Boolean from comparison chain
Implement a function that evaluates a chain of comparisons and returns the boolean result.
Max of a variable-length list
Implement a function that returns the maximum value from a list of numbers without using max().
Between inclusive
Write a function that returns True if a number is between two given bounds, inclusive of the bounds.
Count Multiples in a Range
Given a start, end, and divisor, count how many integers in [start, end] are divisible by the divisor.
Max of three numbers
Implement a function that returns the maximum of three numbers using comparisons.
Sign of a number
Write a function sign_of_number that returns -1 for negatives, 0 for zero, and 1 for positives.
Find Minimum Value
Write a function that returns the minimum integer from a given list.
Is isogram
Implement a function that determines whether a string is an isogram (no repeated letters, case-insensitive).
Is isogram?
Write a function that checks whether a given word is an isogram, ignoring letter case and only considering alphabetic characters.
Isomorphic Strings Check
Given two strings, check if they are isomorphic by verifying a one-to-one character mapping.
Hamming Distance
Implement a function that computes the Hamming distance between two strings of equal length.
Compare Version Strings
Given two version strings, compare them numerically by splitting on dots and ignoring leading zeros.
Are two lists the same multiset
Write a function that checks if two lists contain the same elements with the same multiplicities, ignoring order.
Rectangle class
Implement a Rectangle class with properties, methods, and special methods for basic geometry and comparison.
Playing card class
Design a PlayingCard class with suit, rank, color, and equality/comparison magic methods.
Shell Sort
Implement Shell sort, an in-place comparison sort that generalizes insertion sort, using a gap sequence that shrinks by half each pass.
Count divisors
Compute the number of positive divisors of a given integer using its prime factorization.
Sum of divisors
Given an integer n, return the sum of all its positive divisors.
Perfect Number Check
Write a function that returns True if a number is perfect, i.e., equal to the sum of its proper divisors.
Abundant Number Check
Implement a function to check whether a given integer is abundant: sum of proper divisors exceeds the number.
Amicable Numbers Check
Write a function that checks if two numbers are an amicable pair by comparing sums of proper divisors.
Deficient Number Check
Write is_deficient(n) that returns True if the sum of proper divisors is less than n.
Isolate Rightmost Set Bit
Given an integer, return a number with only its rightmost set bit set.
Format date output
Parse ISO date strings and format them into a friendly US-style date output.
Week Number ISO
Given a date, return its ISO 8601 week number (1–53) without using datetime.isocalendar().
Constant Time Compare
Write a function that compares two strings without leaking length or content via timing.
Showing 31 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.