Practice Arena

Python Coding Challenges

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

819 challenges 506 easy 280 medium 33 hard
Python Basics easy

Factorial (iterative)

Compute n! iteratively without recursion.

loops math
+8 pts 8m
Python Basics easy

Clamp a Number to a Range

Implement a clamp function that returns a value within a specified range.

numbers conditionals comparisons
+5 pts 5m
Python Basics easy

Max of a variable-length list

Implement a function that returns the maximum value from a list of numbers without using max().

conditionals loops comparison
+10 pts 10m
Python Basics easy

Replace negatives with zero

Implement a function that replaces all negative numbers in a list with zero.

lists loops conditionals
+10 pts 10m
Python Basics easy

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.

arithmetic formatting conditionals
+8 pts 10m
Python Basics easy

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.

division modulo conditionals
+10 pts 10m
Python Basics easy

Modulo Remainder

Implement a function that returns the remainder of a divided by b without using the modulo operator.

modulo arithmetic integers
+5 pts 5m
Python Basics easy

Digit Count

Count the number of digits in an integer using arithmetic, without string conversion.

numbers loops math
+8 pts 12m
Python Basics easy

Find Missing Number

Given a list of n distinct integers from 0..n with one missing, return the missing number.

math integers arrays
+10 pts 10m
Python Basics easy

Enumerate with start

Implement a function that mimics Python's enumerate with a custom start index.

enumerate loops tuples
+5 pts 5m
Python Basics easy

Convolve 1D signal

Implement a 1D convolution function with three modes using pure Python.

convolution arrays loops
+8 pts 12m
Python Basics easy

Guess Number Game

Simulate a number guessing game with attempts, feedback, and a win/lose result.

loops conditionals functions
+10 pts 15m
Python Basics easy

Broadcast Add Scalar

Add a scalar to every number in a 2D list and return a new 2D list without modifying the original.

nested-loops addition lists
+10 pts 15m
Python Basics easy

Reshape array dimensions

Implement a function that reshapes a 1D list into a 2D list with given dimensions.

reshape matrix lists
+8 pts 10m

Showing 14 challenges · easy · Python Basics

Python Basics — Python coding challenges

What you will find here

This page lists python basics challenges — real Python problems you solve in the browser IDE with instant test feedback. Each challenge includes a clear brief, starter code, and automated checks.

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.