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
OOP & Classes easy

Stack class

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

OOP stack data-structures
+12 pts 15m
OOP & Classes medium

Linked list reversal

Implement a singly linked list and a function to reverse it in place.

linked-list OOP pointers
+28 pts 25m
OOP & Classes medium

Matrix addition operator

Implement a Matrix class that supports + and * operators.

OOP dunder matrix
+22 pts 20m
OOP & Classes easy

Event emitter basics

Implement an EventEmitter class with subscribe/emit/unsubscribe functionality.

oop callbacks events
+10 pts 15m
OOP & Classes easy

Rectangle class

Implement a Rectangle class with properties, methods, and special methods for basic geometry and comparison.

classes magic-methods geometry
+10 pts 12m
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
OOP & Classes easy

Queue class (list-based)

Implement a Queue class with enqueue, dequeue, peek, is_empty, and is_full methods using a list.

queue oop list
+10 pts 15m
OOP & Classes medium

Comparable mixin

Create a Comparable mixin that auto-generates all rich comparison operators from a single __lt__ method.

oop mixin dunder-methods
+20 pts 20m
OOP & Classes medium

Class Method Factory

Create a class method factory that dynamically adds methods to a class based on a mapping of names to behaviors.

oop metaprogramming factory
+20 pts 25m
OOP & Classes easy

Abstract Base Class

Create an abstract Shape class and implement Rectangle and Circle subclasses with area and perimeter.

abc abstract oop
+10 pts 15m
OOP & Classes medium

Reentrant Lock Manager

Implement a ReentrantLock class with acquire, release, locked, owner, and helper functions that test thread-safety with real threads.

threading locking reentrant
+20 pts 20m

Showing 11 challenges · OOP & Classes

OOP & Classes — Python coding challenges

What you will find here

This page lists oop & classes 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.