Apps

🏥 PySurgeon

Compiler Sandbox — Python 3.10+ · Lexer · AST · Bytecode

Run:Ctrl+Enter Clear:Ctrl+L

🏥 PySurgeon Compiler Sandbox (Python 3.10+)

📝 Patient Code Input — print · assignment · match-case · math

💻 Console Output & 🩺 AST Anatomy

Run your code to see the console output and AST here…

🔍 What the Compiler Did — Plain English

Run your code to see the compiler report here…

Supported Syntax

Print & Assignment

print("Hello")
x = 5 + 10
name = "Ayman"
flag = True

Match-Case + Wildcard

match status:
  case 200:
    print("Found")
  case 404:
    print("Not Found")
  case _:
    print("Unknown")

Textbook Activities

From Python Programming: A Logic, Problem-Solving, and Puzzle-Based Approach

🔍 Logic Puzzle — Mysterious Output

Trace variable states and predict the output before running.

🩺 Code Audit — Diagnose & Refactor

Identify the defect, fix it to PEP 8, and verify with the compiler.

🔀 Active Learning — Match-Case Router

Simulate a command router using match-case and the wildcard pattern.

PySurgeon © 2026 Ayman Alzaid — Companion tool for Python Programming: A Logic, Problem-Solving, and Puzzle-Based Approach. Free to use for learning.