Skip to content

Latest commit

History

52 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

🐍 پایتون‌باز | Python Baz

یادگیری پایتون با بازی و چالش | Learn Python Through Games & Challenges

Python Game LabWebMITActiveLive Demo


🎮 پایتون‌باز چیه؟

یه بازی آنلاین برای یادگیری پایتون از صفر با حالت آرکید! هر فصل شامل آموزش، تمرین و چالش هست. با حل کردن چالش‌ها ایکس‌پی بگیر، سطحت بالا بره، و فصل‌های بعدی باز بشه!

🔗 بازی آنلاین پایتون‌باز

✨ امکانات

امکانتوضیح
📖 آموزش سادههر فصل با توضیح ساده و مثال شروع میشه
🎯 چالش‌های متنوعپیش‌بینی خروجی، شکار باگ، جای خالی، چندگزینه‌ای
💾 ذخیره پیشرفتاز هرجا ادامه بده، پیشرفتت از بین نمیره
🔊 صدا و افکتتجربه بازی با صدا و انیمیشن
📱 ریسپانسیوروی موبایل و دسکتاپ کار میکنه
🔒 سطح‌بندیفصل‌ها قفل هستن و باید فصل قبلی رو تموم کنی
🌙☀️ حالت تاریک/روشنتم دلخواهت رو انتخاب کن
🏅 XP و لِوِلسیستم ایکس‌پی بازی‌وار با سطح‌بندی پیشرفت
🔥 روزانه‌ی پیاپیهر روز وارد شو تا استریک روزانه‌ات حفظ بشه
⚡ انرژیسیستم انرژی برای مدیریت بازی روزانه
📋 ماموریت‌های روزانهکوئست‌های روزانه با پاداش ایکس‌پی
🛒 فروشگاه بازیآیتم‌ها و اسکین‌های قابل خرید با ایکس‌پی
👤 پروفایلصفحه پروفایل با آمار و دستاورد‌ها
⚙️ تنظیماتصفحه تنظیمات با شخصی‌سازی
📖 واژه‌نامه پایتون۳۷ کلمه کلیدی با توضیح فارسی
🔍 جستجوی فصلسریع فصل مورد نظرت رو پیدا کن
⏱️ تایمر چالشچالش‌ها رو با تایمر حل کن
📊 پیشرفت کلینوار پیشرفت + آمار کامل

📸 اسکرین‌شات‌ها

به‌زودی اضافه می‌شه...

📚 فصل‌ها

📗 مبتدی

شروع یادگیری

فصل
۱متغیرها
۲عملگرها

📘 متوسط

عمیق‌تر شو!

فصل
۳شرط‌ها
۴حلقه‌ها
۵توابع

📕 پیشرفته

حرفه‌ای شو!

فصل
۶لیست‌ها
۷دیکشنری‌ها
۸متدهای رشته
۹مدیریت فایل
۱۰مدیریت خطا

🎓 حرفه‌ای

استاد شو!

فصل
۱۱شی‌گرایی
۱۲جنریتورها
۱۳دکوراتورها
۱۴ماژول‌ها
۱۵عبارات باقاعده
۱۶فریم‌ورک‌ها
۱۷پایتون در عمل
۱۸توابع لامبدا
۱۹لیست کامپریهنشن
۲۰محیط مجازی
۲۱پایگاه داده
۲۲API و اینترنت
۲۳تست‌نویسی

# 🐍 Python Baz

Learn Python Through Games & Challenges

Python Game LabWebMITActiveLive Demo


🎮 What is Python Baz?

An online game for learning Python from scratch with an arcade experience! Each chapter includes lessons, exercises, and challenges. Earn XP, level up, and unlock new chapters!

🔗 Play Python Baz Online

✨ Features

FeatureDescription
📖 Simple LessonsEach chapter starts with easy explanations and examples
🎯 Various ChallengesPredict output, bug hunting, fill-in-the-blank, multiple choice
💾 Save ProgressResume from anywhere, your progress is saved locally
🔊 Sound & EffectsGame experience with sounds and animations
📱 ResponsiveWorks on mobile and desktop
🔒 Level SystemChapters are locked — complete previous ones to unlock
🌙☀️ Dark/Light ModeChoose your preferred theme
🏅 XP & LevelsArcade-style XP system with progression
🔥 Daily StreakLog in daily to maintain your streak
⚡ EnergyEnergy system for daily gameplay management
📋 Daily QuestsDaily quests with XP rewards
🛒 In-Game ShopBuy items and skins with XP
👤 ProfileProfile page with stats and achievements
⚙️ SettingsSettings page with customization
📖 Python Glossary37 key terms with Persian descriptions
🔍 Chapter SearchFind any chapter instantly
⏱️ Challenge TimerComplete challenges against the clock
📊 Progress TrackingOverall progress bar + detailed stats

📸 Screenshots

Coming soon...

📚 Chapters

📗 Beginner

Start learning

Chapter
1Variables
2Operators

📘 Intermediate

Go deeper!

Chapter
3Conditionals
4Loops
5Functions

📕 Advanced

Pro level!

Chapter
6Lists
7Dictionaries
8String Methods
9File Handling
10Error Handling

🎓 Expert

Master it!

Chapter
11OOP
12Generators
13Decorators
14Modules
15Regex
16Frameworks
17Python in Practice
18Lambda Functions
19List Comprehension
20Virtual Environments
21SQLite Database
22API & HTTP
23Testing with pytest

🚀 Getting Started

🎮 Play Online (No Install Needed)

🔗 Play Python Baz Online

💻 Run Locally

# Clone the repo
git clone https://github.com/erpycode/python-baz.git
# Go to directorycd python-baz
# Start local server
python3 -m http.server 8080
# Open browser → http://localhost:8080

📁 Project Structure

python-baz/
├── index.html # Main page (SPA entry)
├── css/
│ ├── tokens.css # Design tokens (colors, spacing, etc.)
│ ├── base.css # Base/reset styles
│ ├── arcade.css # Arcade theme & gamification styles
│ ├── components.css # Reusable UI components
│ └── pages.css # Page-specific styles
├── js/
│ ├── app.js # SPA router + main entry
│ ├── router.js # Hash-based router
│ ├── state.js # Global state management (versioned)
│ ├── migration.js # Legacy data migration
│ ├── views/
│ │ ├── home.js # Home/dashboard view
│ │ ├── map.js # Chapter map view
│ │ ├── lesson.js # Lesson view
│ │ ├── exercises.js # Exercises view
│ │ ├── challenges.js # Challenge view
│ │ ├── result.js # Result/score view
│ │ ├── profile.js # Profile page
│ │ └── settings.js # Settings page
│ ├── systems/
│ │ ├── xp.js # XP & level system
│ │ ├── streak.js # Daily streak tracking
│ │ ├── energy.js # Energy system
│ │ ├── quests.js # Daily quests
│ │ ├── shop.js # In-game shop
│ │ └── sound.js # Sound effects (Web Audio API)
│ ├── utils.js # Helper functions
│ ├── glossary.js # Python glossary (37 terms)
│ └── search.js # Chapter search filter
├── data/
│ ├── chapter_1.json # 📗 Variables
│ ├── ... # (23 chapters total)
│ └── chapter_23.json # 🎓 Testing with pytest
├── .github/
│ └── workflows/
│ └── deploy.yml # GitHub Pages deployment
├── .nojekyll # Bypass Jekyll processing
├── DESIGN.md # Design documentation
└── README.md

🏗️ Architecture

SPA Router

Hash-based routing (#/home, #/map, #/lesson/1, etc.) with view-based rendering. No page reloads.

State Management

Versioned state in localStorage with automatic migration when upgrading. Stores XP, streaks, energy, quests, shop inventory, and chapter progress.

Views Pattern

Each page is a self-contained view module (views/*.js) that renders into the main content area.

Gamification Systems

  • XP/Level: Earn XP from challenges; level up with progression
  • Daily Streak: Login consecutive days for bonus rewards
  • Energy: Regenerate over time; spend on activities
  • Daily Quests: Fresh challenges every day
  • Shop: Spend XP on cosmetics and boosts

🤝 Contributing

Contributions are welcome!

  1. 🍴 Fork the repo
  2. 🌿 Create a feature branch
  3. ✏️ Commit changes
  4. 📤 Push to branch
  5. 🔀 Open a Pull Request

📝 Adding a New Chapter

Create a new JSON file in the data/ folder and add its name to js/app.js. See DESIGN.md for details.

📄 License

MIT License


Made with ❤️ by ErPyCode

About

🐍 یادگیری پایتون با بازی و چالش | Learn Python Through Games & Challenges

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages