π Interactive Learning Platform
Welcome to the Interactive Learning Platform - a LeetCode/HackerRank-style experience for learning Python right in your browser!
Features
Code Editor
Syntax highlighting with CodeMirror
Python Runtime
Execute Python directly in browser
Auto-Grading
Instant feedback on your solutions
Hints
Progressive hints when you're stuck
Try It Out
Exercise 1: Company Welcome Message
Create a function that generates a welcome message for a company.
Exercise 2: Calculate Gross Profit
Create a function that calculates gross profit from revenue and cost of goods sold (COGS).
Formula: Gross Profit = Revenue - COGS
Exercise 3: Calculate Profit Margin
Calculate the gross profit margin percentage, handling the edge case where revenue is 0.
Formula: Profit Margin = (Gross Profit / Revenue) Γ 100
How It Works
flowchart LR
A[Write Code] --> B[Run Tests]
B --> C{Pyodide<br/>Python Runtime}
C --> D[Compare Output]
D --> E{Pass?}
E -->|Yes| F[β
Success!]
E -->|No| G[β Try Again]
G --> A
- Write your solution in the code editor
- Click "Run Tests" or press
Ctrl+Enter - See instant feedback with test results
- Use hints if you get stuck
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+Enter | Run tests |
Ctrl+Z | Undo |
Ctrl+Shift+Z | Redo |
Tab | Indent |