Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 72 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,47 +170,100 @@ We welcome contributions of all kinds! Here's how to help:

### Ways to Contribute

1. **Solve Issues** - Pick an issue and submit your solution
2. **Improve Documentation** - Fix typos, add examples
3. **Create New Issues** - Report bugs or suggest features
4. **Help Others** - Answer questions in discussions
5. **Review PRs** - Review and provide feedback
| Contribution Type | Description | Good For |
|-------------------|-------------|----------|
| **🐛 Fix Bugs** | Fix issues in existing code | All levels |
| **📝 Add Examples** | Contribute new Python examples | Beginner+ |
| **🧪 Write Tests** | Add unit tests for code | Intermediate+ |
| **📖 Improve Docs** | Enhance documentation | All levels |
| **💡 Suggest Features** | Propose new learning modules | All levels |
| **🔍 Review PRs** | Review and provide feedback | Advanced |

### Quick Start for Contributors

```bash
# 1. Fork the repository
# 1. Fork the repository on GitHub

# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/Python.git
cd Python

# 3. Create a branch
git checkout -b feature/your-feature
git checkout -b issue-<number>-your-name

# 4. Make your changes
# - Follow PEP 8 style guidelines
# - Add comments explaining your code
# - Include test cases if applicable

# 5. Test your changes
python -m pytest # or run individual scripts

# 6. Commit and push
git add .
git commit -m "feat: add your feature"
git push origin feature/your-feature
git commit -m "feat: add your feature description"
git push origin issue-<number>-your-name

# 7. Create a Pull Request
# 7. Create a Pull Request on GitHub
```

### Contribution Guidelines

- ✅ Follow PEP 8 style guidelines
- ✅ Add comments explaining your code
- ✅ Include test cases
- ✅ Update documentation if needed
- ✅ Be respectful and inclusive
#### Code Style
- **Variables/Functions:** `lowercase_with_underscores`
- **Classes:** `PascalCase`
- **Constants:** `UPPERCASE`
- Follow [PEP 8](https://pep8.org/) style guidelines

#### Commit Messages
Use conventional commits format:
```
type: short description

Optional details
```

**Types:**
| Type | Description |
|------|-------------|
| `feat:` | New feature or example |
| `fix:` | Bug fix |
| `docs:` | Documentation changes |
| `style:` | Formatting only |
| `refactor:` | Code restructuring |
| `test:` | Adding tests |

**Examples:**
```
feat: add list comprehension examples
fix: correct typo in calculator.py
docs: update README with quickstart guide
```

#### Code Quality
The project uses automated tools to ensure code quality:
- **Black** - Code formatting
- **Ruff** - Linting
- **Bandit** - Security scanning

Run locally before submitting:
```bash
# Format code
black .

# Lint code
ruff check .

# Security scan
bandit -r .
```

### Need Help?

- 📖 [Contributing Guide](CONTRIBUTING.md)
- 💬 [GitHub Discussions](https://github.com/hackdartstorm/Python/discussions)
- 🐛 [Report an Issue](https://github.com/hackdartstorm/Python/issues)
- 📧 [Contact Maintainers](mailto:learn@pythonmastery.dev)
- 📖 [Contributing Guide](CONTRIBUTING.md) - Detailed guidelines
- 💬 [GitHub Discussions](https://github.com/hackdartstorm/Python/discussions) - Ask questions
- 🐛 [Report an Issue](https://github.com/hackdartstorm/Python/issues) - Bug reports & features
- 📧 [Contact Maintainers](mailto:learn@pythonmastery.dev) - Direct contact

---

Expand Down
8 changes: 5 additions & 3 deletions exercises/1000_programs/medium/1880_word_sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ def word_to_number(word: str) -> int:


def is_sum_equal(firstWord: str, secondWord: str, targetWord: str) -> bool:
return word_to_number(firstWord) + word_to_number(secondWord) == word_to_number(targetWord)
return word_to_number(firstWord) + word_to_number(secondWord) == word_to_number(
targetWord
)


if __name__ == "__main__":
# Exemplos básicos para teste manual
print(is_sum_equal("acb", "cba", "cdb")) # True
print(is_sum_equal("aaa", "a", "aaaa")) # True
print(is_sum_equal("a", "b", "c")) # False
print(is_sum_equal("aaa", "a", "aaaa")) # True
print(is_sum_equal("a", "b", "c")) # False