Sponsored Reserved space — layout preview until AdSense is connected
Practice Arena

Python Coding Challenges

Write real Python in the browser. Instant feedback. From beginner to expert.

56 challenges 25 easy 23 medium 8 hard
Sponsored Reserved space — layout preview until AdSense is connected
Python Basics easy

FizzBuzz, precisely

Return a newline-separated string for 1..n: Fizz, Buzz, FizzBuzz, or the number.

control flow strings modulo
+10 pts 12m
Python Basics easy

Temperature converter

Convert Celsius to Fahrenheit: F = C × 9/5 + 32.

arithmetic floats
+5 pts 5m
Python Basics easy

Even or odd?

Return 'even' or 'odd' for an integer.

modulo conditionals
+5 pts 5m
Python Basics easy

Sum of digits

Return the sum of all decimal digits of a non-negative integer.

arithmetic loops
+8 pts 10m
Python Basics easy

Collatz steps

Count how many steps the Collatz sequence takes to reach 1 from n.

loops math
+10 pts 12m
Python Basics easy

Factorial (iterative)

Compute n! iteratively without recursion.

loops math
+8 pts 8m
Python Basics easy

Power of two?

Return True if n is an exact power of 2.

bitwise math
+8 pts 8m
Python Basics easy

GCD via Euclid

Compute the greatest common divisor of two positive integers.

math recursion
+10 pts 10m
Python Basics easy

Prime checker

Return True if n is a prime number.

math loops
+10 pts 10m
Strings & Text easy

Reverse a string

Return the characters of the string in reverse order.

strings slicing
+5 pts 5m
Strings & Text easy

Palindrome check

Return True if the string reads the same forwards and backwards (ignoring case and non-alphanumeric).

strings two-pointer
+8 pts 8m
Strings & Text easy

Count vowels

Count the number of vowels (a, e, i, o, u) in a string (case-insensitive).

strings counting
+5 pts 5m
Strings & Text easy

Title case converter

Return the string with each word capitalised.

strings split
+5 pts 5m
Strings & Text easy

Anagram check

Return True if two strings are anagrams of each other.

strings sorting counter
+10 pts 10m
Lists & Arrays easy

Two Sum

Return indices (i, j) with i < j such that nums[i] + nums[j] == target.

dict complement
+18 pts 16m
Lists & Arrays easy

Remove duplicates (sorted)

Return a sorted list with duplicates removed.

arrays two-pointer
+10 pts 10m
Lists & Arrays easy

Merge two sorted arrays

Merge two sorted arrays into one sorted array.

arrays merge two-pointer
+12 pts 12m
Dicts & Sets easy

Word frequency

Return a dict mapping each word to its count in the sentence.

dict counter
+10 pts 10m
Dicts & Sets easy

List intersection

Return the sorted list of elements common to both lists.

sets intersection
+8 pts 8m
Dicts & Sets easy

First non-repeating character

Find the index of the first character that appears only once.

dict strings counter
+12 pts 12m
Dicts & Sets easy

Most frequent element

Return the element that appears most often in a list.

counter dict
+8 pts 8m
OOP & Classes easy

Stack class

Implement a Stack class with push, pop, peek, is_empty, and size.

OOP stack data-structures
+12 pts 15m
Data Structures & Algorithms easy

Valid parentheses

Return True if brackets in the string close in the correct order.

stack strings
+15 pts 14m
Data Structures & Algorithms easy

Binary search

Return the index of target in a sorted list, or -1 if not present.

searching binary-search
+12 pts 12m
Advanced Python easy

Infinite counter generator

Create an infinite counter starting from `start`, stepping by `step`.

generators itertools
+12 pts 12m

Showing 25 challenges · easy