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

Design Twitter Feed

Implement a Twitter class with postTweet, getNewsFeed, follow, and unfollow methods.

classes sorting timeline
+25 pts 30m
OOP & Classes easy

Deck of Cards Class

Implement a Deck class representing a standard 52-card deck with shuffle, deal, and len support.

oop classes random
+10 pts 15m
OOP & Classes easy

Dataclass with slots

Implement a slotted frozen dataclass representing a 2D point with total ordering.

dataclass slots immutability
+10 pts 15m
OOP & Classes easy

Playing card class

Design a PlayingCard class with suit, rank, color, and equality/comparison magic methods.

oop classes magic-methods
+10 pts 15m

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