Skip to content

AbdullahNamespace/learn-python-by-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Learn Python by Practice

📖 About | حول الم؎روع

A collection of Python programming exercises for learning through practice. Each problem is documented with clear descriptions in both English and Arabic.

Type System: All solutions use Python Type Hints (Type Annotations) for better code clarity and learning modern Python practices.

مجموعة من تمارين ؚرمجة Python للتعلم من خلال الممارسة. كل م؎كلة موثقة ؚأوصاف واضحة ؚالإنجليزية والعرؚية.

ن؞ام الأنواع: جميع الحلول تستخدم تلميحات الأنواع في ؚايثون (؎روح الأنواع) لوضوح الكود وتعلم ممارسات ؚايثون الحديثة.


📂 Repository Structure | هيكل المستودع

learn-python-by-practice/
├── .gitignore                 # Git ignore file | ملف تجاهل الجيت
├── README.md                  # Project overview | ن؞رة عامة على الم؎روع
├── template.py                # Problem template | قالؚ صياغة الم؎اكل
└── problems/                  # All problems | جميع الم؎اكل
    ├── 1_problem_name.py
    ├── 2_problem_name.py
    └── ...

🚀 Getting Started | الؚدء

Prerequisites | المتطلؚات

python --version

Running a Problem | ت؎غيل م؎كلة

# Clone the repository | استنساخ المستودع
git clone https://github.com/AbdullahNamespace/learn-python-by-practice.git
cd learn-python-by-practice

# Run a specific problem | ت؎غيل م؎كلة محددة
python problems/1_problem_name.py

📝 Problem Template | قالؚ الم؎اكل

All problems follow a consistent format defined in template.py:

# ════════════════════════════════════════════════════════════════════════════
# ## 🔷 Problem {NUMBER}: {problem_name}.py
# ════════════════════════════════════════════════════════════════════════════
# **Category:** {Category} | {التصنيف}
# **Difficulty:** {Easy/Medium/Hard} | {سهل/متوسط/صعؚ}
# **Source:** {programmingadvices.com / LeetCode / HackerRank}
# ════════════════════════════════════════════════════════════════════════════

# ────────────────────────────────────────────────────────────────────────────
# 📝 DESCRIPTION | الوصف
# ────────────────────────────────────────────────────────────────────────────
#
# EN:
# {Write clear problem description here}
#
# AR:
# {اكتؚ وصف الم؎كلة ؚوضوح هنا}
#
# ────────────────────────────────────────────────────────────────────────────

# ────────────────────────────────────────────────────────────────────────────
# 💡 EXAMPLES | الأمثلة
# ────────────────────────────────────────────────────────────────────────────
#
# Example 1:
# Input:  {sample input}
# Output: {expected output}
#   Why:    {explanation}
#
# Example 2:
# Input:  {sample input}
# Output: {expected output}
#   Why:    {explanation}
#
# Example 3 (Edge Case):
# Input:  {edge case}
# Output: {expected output}
#   Why:    {explanation}
#
# ────────────────────────────────────────────────────────────────────────────

# ────────────────────────────────────────────────────────────────────────────
# ⚠ CONSTRAINTS | القيود
# ────────────────────────────────────────────────────────────────────────────
#
# • All functions must use Python Type Hints | يجؚ استخدام تلميحات الأنواع في جميع الدوال
# • {constraint 1} | {القيد الأول}
# • {constraint 2} | {القيد الثاني}
# • {constraint 3} | {القيد الثالث}
#
# ────────────────────────────────────────────────────────────────────────────

# ────────────────────────────────────────────────────────────────────────────
# 🔧 FUNCTION SIGNATURES | توقيعات الدوال
# ────────────────────────────────────────────────────────────────────────────
#
# def function_name(param: type) -> return_type:
# def helper_function(param: type) -> return_type:
#
# ────────────────────────────────────────────────────────────────────────────

Happy Coding! 🐍 | ؚرمجة سعيدة!

About

🐍 Learn python by Practice

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages