OpenAI

Verified interview challenge

Build a three-card poker simulator

Implement a small card game whose ranking and round rules expand across several parts.

Unlock with Full Access

The challenge

Build a two-player card game and extend it through three parts with additional hand-comparison and folding rules. Cards arrive in a supplied order, so the task centres on game state rather than shuffling.

Several games may be active at once, with deals interleaved and results inspected between actions. Keep each game's state independent as the rules expand and explain what the result means before and after a round finishes.

What you'll practise

  • Round lifecycle

    Handle incomplete, completed and folded games without corrupting their state.

  • Hand comparison

    Extend ranking rules while preserving deterministic results.

Your coding workspacePreview
Current partFurther parts unlock as you progress
solution.pyPython 3.13
# Build on your implementation

# Run checks for the current part

# Full starter code included
Current-part checks

Run your code to see results.

The complete sequence, starter code and checks are included with Full Access.