Welcome! We're thrilled you want to contribute to Python Practices! This guide makes it super easy for everyone to share questions, solutions, and improvements. Whether you're a beginner or expert, your contributions are valuable! 🌟
Got a Python question or exercise idea? Just create an issue!
📝 Template for Questions:
Title: [Question] How to implement a shopping cart class?
**Topic**: Object-Oriented Programming
**Difficulty**: Intermediate
**Question**:
I want to create a shopping cart that can add items, remove items, and calculate total price. How should I structure this?
**What I've tried**:
[Optional: Share any code you've attempted]
**Learning goal**:
Understanding classes, methods, and data management
Have a great solution to share? Create a pull request or issue!
📝 Template for Solutions:
Title: [Solution] Shopping cart implementation with multiple approaches
**Original Question**: [Link to question or describe it]
**Difficulty**: Intermediate
**My Solution**:
[Paste your code with comments explaining your approach]
**Why this approach**:
[Explain your reasoning and what makes it good]
Found something to improve? Just let us know!
- Go to Issues
- Click "New Issue"
- Use our templates below with these title formats:
[Question] Your question here[Exercise] Your exercise idea here[Improvement] What you want to improve[Bug] Problem you found
- Submit and we'll help you turn it into content!
- Fork the repository
- Add your content following our simple format
- Submit a pull request
- We'll review and merge!
- Browse existing issues
- Add your thoughts, solutions, or questions in comments
- Help others by sharing your knowledge and experience!
## 📚 **Topic**: [e.g., Classes and Objects, Functions, etc.]
## 🎯 **Difficulty**: [Basic/Intermediate/Advanced/Expert]
### **Question/Exercise**:
[Describe what you want to learn or what exercise you're proposing]
### **Learning Objectives**:
- [What should students learn from this?]
- [What concepts does it cover?]
### **Example/Context** (optional):
[Any real-world context or examples that might help]
### **Your Attempt** (optional):
```python
# If you've tried solving it, share your code here
# Don't worry if it's not perfect![What exactly are you stuck on or want to improve?]
### 🟡 **Template 2: Share a Solution**
```markdown
## 🎯 **Solution for**: [Question title or description]
## 📚 **Topic**: [e.g., OOP, Functions, etc.]
## 🎯 **Difficulty**: [Basic/Intermediate/Advanced/Expert]
### **My Solution**:
```python
"""
Clear description of what this code does
"""
# Your solution with clear comments
class Example:
def __init__(self):
# Explain what this does
pass
def method_name(self):
# Explain the logic
pass
# Example usage
example = Example()
- [Explain your reasoning]
- [What makes this solution good]
- [Any trade-offs or considerations]
[If you know other ways to solve it, mention them]
[Where might this be used in practice?]
### 🟠 **Template 3: Suggest an Improvement**
```markdown
## 🔧 **Improvement for**: [File name or section]
## 📍 **Location**: [Specific file or section]
### **Current Issue**:
[What could be better?]
### **Suggested Improvement**:
[Your specific suggestion]
### **Why This Helps**:
[How does this make learning better?]
### **Proposed Changes** (optional):
```python
# If you have specific code changes, include them here
## 🎨 **Our Simple Exercise Format** (If you want to contribute code)
When creating exercise files, follow this beginner-friendly structure:
```python
"""
Question: [Clear, simple description of what to build]
Example: Create a class called 'BankAccount' that can deposit and withdraw money.
Difficulty: [Basic/Intermediate/Advanced/Expert]
Topics: [Classes, Methods, etc.]
"""
# LEARNING CHALLENGE
#
# 🎯 Try solving this yourself first!
#
# Tips:
# - Start simple
# - Test as you go
# - Don't worry about perfection
# - Learning happens by doing!
# 💻 Write your solution here:
# (Space for learners to code)
# 💡 HINTS (Only look if you're stuck!)
#
# Think about:
# - What data does this need to store?
# - What actions should it be able to do?
# - How do the pieces work together?
# ✅ STEP-BY-STEP SOLUTION
#
# Let's build this together, step by step!
# Step 1: [First step with explanation]
# Step 2: [Second step with explanation]
# etc.
# 🌟 COMPLETE SOLUTION
class BankAccount:
def __init__(self, initial_balance=0):
self.balance = initial_balance
def deposit(self, amount):
if amount > 0:
self.balance += amount
return f"Deposited ${amount}. New balance: ${self.balance}"
return "Deposit amount must be positive"
# 🧪 TEST YOUR SOLUTION
account = BankAccount(100)
print(account.deposit(50)) # Should work!
# 🚀 CHALLENGE YOURSELF
# - Add a withdraw method
# - Add account number tracking
# - Add transaction history
- Clear questions that help others learn
- Well-commented solutions that explain the thinking
- Real-world examples that show practical applications
- Multiple approaches to the same problem
- Beginner-friendly explanations that anyone can follow
- Progressive difficulty that builds skills step by step
- Beginner exercises for people just starting
- Real-world projects that combine multiple concepts
- Common mistake examples and how to fix them
- Industry best practices and professional tips
- Alternative solutions showing different approaches
- Practical applications of theoretical concepts
- Be encouraging - everyone is learning!
- Explain your thinking - help others understand
- Ask questions - no question is too basic
- Share mistakes - they help others learn
- Celebrate progress - every step counts
- Help others - we're all in this together
- Judge others' skill levels
- Share solutions without explanations
- Make assumptions about prior knowledge
- Use overly complex examples for basic concepts
- Forget to test your code examples
- 🌟 Credit in the repository
- 📝 Recognition in our contributor list
- 🎉 Mention in release notes
- 💌 Personal thank you from the maintainers
- 🏅 Special contributor badge
- 🎯 Input on repository direction
- 📚 Early access to new content
- 🤝 Invitation to join the maintainer team
- 🐛 Issues - Ask questions, share ideas, report problems
- 💬 Issue Comments - Join conversations on existing issues
- 📧 Email - For private questions or concerns
- 🌟 GitHub Profile - Contact @soltanegharb directly
Q: "I'm a beginner, can I still contribute?" A: Absolutely! Beginner perspectives are incredibly valuable. Your questions help us create better content!
Q: "My code isn't perfect, should I still share it?" A: Yes! Imperfect code with good explanations is often more helpful than perfect code without context.
Q: "I have an idea but don't know how to implement it."
A: Perfect! Create an issue with the [Idea] tag and we'll help you develop it together!
Q: "Can I contribute in languages other than English?" A: Currently we focus on English, but we're open to internationalization in the future!
- 🚀 Jump Right In: Create an Issue with your question or idea
- 💬 Join the Conversation: Comment on existing issues to share your thoughts
- 🔧 Submit Code: Fork, code, and create a pull request
- 📚 Browse First: Look through existing content for inspiration
- A question you've always wondered about
- A solution to an existing exercise
- An improvement to documentation
- A real-world example
- A beginner-friendly explanation
- A challenging advanced problem
Every contribution, no matter how small, makes Python Practices better for learners worldwide. You're helping create a resource that will teach and inspire countless developers!
Ready to make a difference? Start here and let's build something amazing together! 🚀
Questions? Ideas? Just want to say hi? We'd love to hear from you! 💙