Practice Arena

Python Coding Challenges

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

467 challenges 330 easy 120 medium 17 hard
Python Basics easy

Temperature converter

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

arithmetic floats
2
+5 pts 5m
Python Basics easy

Sum of digits

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

arithmetic loops
2
+8 pts 10m
Python Basics easy

Sum numbers from 1 to n

Implement a function that computes the sum of all integers from 1 to n.

sum loop arithmetic
+5 pts 5m
Python Basics easy

Seconds to Hours Minutes Seconds

Convert total seconds into a zero-padded HH:MM:SS format.

arithmetic divmod formatting
+8 pts 10m
Python Basics easy

Digit count of an integer

Given an integer, return the number of digits it has, handling negatives and zero correctly.

integers loops arithmetic
+5 pts 5m
Python Basics easy

Toggle a boolean n times

Apply boolean toggling n times and return the final boolean value.

booleans arithmetic modulo
+6 pts 8m
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

Simple Interest Calculator

Implement a function that calculates simple interest given principal, annual rate, and time in years.

arithmetic floats basics
+5 pts 5m
Python Basics easy

Tip Calculator

Write a function that calculates the total bill after adding a given tip percentage.

arithmetic rounding basics
+8 pts 10m
Python Basics easy

Absolute Difference

Implement a function that returns the absolute difference between two numbers.

absolute value arithmetic function
+5 pts 5m
Python Basics easy

Sum from 1 to n

Write a function that returns the sum of all integers from 1 to n (inclusive).

math arithmetic sum
+5 pts 5m
Python Basics easy

Round to nearest ten

Write a function that rounds any integer to the nearest multiple of ten.

arithmetic rounding integers
+8 pts 10m
Python Basics easy

Fahrenheit to Celsius

Implement a function that converts degrees Fahrenheit to degrees Celsius.

temperature arithmetic conversion
+5 pts 5m
Python Basics easy

Speed Converter

Write a function to convert speeds between kilometers per hour and meters per second.

arithmetic conversion function
+5 pts 5m
Python Basics easy

Area of Rectangle

Write a function that returns the area of a rectangle given its width and height.

arithmetic function numbers
+5 pts 5m
Python Basics easy

Perimeter of triangle

Given three side lengths, return the perimeter (sum) of the triangle.

arithmetic geometry basics
+5 pts 5m
Python Basics easy

Volume of Cube

Write a Python function that returns the volume of a cube given its side length.

arithmetic return function
+5 pts 5m
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

Last Digit Extractor

Write a function that returns the last digit of a non-negative integer using the modulo operator.

integers modulo arithmetic
+5 pts 5m
OOP & Classes medium

Complex Number Class

Implement a Complex class supporting addition, subtraction, multiplication, division, equality, and string formatting.

classes magic-methods arithmetic
+20 pts 25m
Math & Number Theory easy

Amicable Numbers Check

Write a function that checks if two numbers are an amicable pair by comparing sums of proper divisors.

divisors arithmetic math
+10 pts 15m
Math & Number Theory easy

Armstrong Number Check

Implement a function that checks if a given integer is an Armstrong number.

arithmetic number-theory validation
+10 pts 10m
Math & Number Theory easy

Multiply without multiply

Write a function that multiplies two integers using only addition, subtraction, and bit shifts — no * operator.

multiplication bit-manipulation arithmetic
+8 pts 12m
Bit Manipulation easy

Add without plus

Implement a function that adds two integers using only bitwise operations, no arithmetic plus or minus.

bitwise addition xor
+10 pts 15m
Bit Manipulation medium

Divide using shifts

Implement division of two integers using only bit shifts and arithmetic, without using division or modulo operators.

integer division bit shifts overflow
+20 pts 20m
Dynamic Programming medium

Longest Arithmetic Subsequence

Given a list of integers, return the length of the longest arithmetic subsequence (constant difference) within it.

dp subsequence hashmap
+30 pts 25m

Showing 27 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

  1. Pick a category — basics, algorithms, strings, and more
  2. Open a challenge, read the statement, and edit the starter code
  3. 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.