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

Integer division and remainder

Write a function that performs integer division and returns both quotient and remainder.

operators division remainder
+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
Lists & Arrays medium

Product except self

Return an array where output[i] is the product of all elements except nums[i], without using division.

arrays prefix-sum
+25 pts 20m
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
Error Handling & Exceptions easy

Safe divide function

Implement safe_divide that returns None on ZeroDivisionError and TypeError.

try-except division error-handling
+8 pts 10m
Error Handling & Exceptions easy

Divide with zero check

Write a function that safely divides two numbers, catching division by zero.

exceptions division error-handling
+8 pts 10m
Error Handling & Exceptions easy

Else on try block

Implement a function that uses try-except-else to safely divide two numbers and return a result or error description.

exception-handling try-except-else division
+8 pts 10m
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

Showing 8 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.