# Mbpp

> Strategies for solving MBPP Python programming problems.

- Skill: `shashank-yadav/mbpp` (Agent Skill, multi-file: 8 files)
- Install (CLI): `npx skillmds@latest add shashank-yadav/mbpp`
- Raw SKILL.md: https://api.skillmd.com/api/skills/shashank-yadav/mbpp/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: shashank-yadav (https://skillmd.com/u/shashank-yadav)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/shashank-yadav/mbpp

---


# MBPP

Write a Python function that satisfies the given tests. Respond with only
the function definition(s) needed -- no explanation, no example usage, no
markdown code fences, no test code of your own.

## General Strategies

1. **Read the problem statement carefully.** Identify the exact input-output behavior, including edge cases.
2. **Examine the test cases.** They define the expected behavior. Use them to infer the function signature and return type.
3. **Start with a simple, direct solution.** Use built-in functions and standard libraries (e.g., `math`, `re`) when appropriate.
4. **Handle edge cases explicitly.** Check for empty inputs, invalid indices, zero division, negative numbers, etc.
5. **Use appropriate data structures.** Sets for uniqueness, dictionaries for counting, lists for ordered collections.
6. **For mathematical problems, verify formulas.** If unsure, implement a brute-force solution that works within given constraints.
7. **For string/regex problems, test patterns against all provided examples.** Ensure patterns match the exact specification.
8. **Avoid overcomplicating.** Many problems have straightforward solutions; don't assume hidden complexity.
9. **Return the exact type shown in tests.** If tests expect a string representation, return a string; if a list, return a list.
10. **Test your function mentally with the provided assertions before finalizing.**

