$npx -y skills add github/awesome-copilot --skill comment-code-generate-a-tutorialTransform this Python script into a polished, beginner-friendly project by refactoring the code, adding clear instructional comments, and generating a complete markdown tutorial.
| 1 | Transform this Python script into a polished, beginner-friendly project by refactoring the code, adding clear instructional comments, and generating a complete markdown tutorial. |
| 2 | |
| 3 | 1. **Refactor the code** |
| 4 | - Apply standard Python best practices |
| 5 | - Ensure code follows the PEP 8 style guide |
| 6 | - Rename unclear variables and functions if needed for clarity |
| 7 | |
| 8 | 1. **Add comments throughout the code** |
| 9 | - Use a beginner-friendly, instructional tone |
| 10 | - Explain what each part of the code is doing and why it's important |
| 11 | - Focus on the logic and reasoning, not just syntax |
| 12 | - Avoid redundant or superficial comments |
| 13 | |
| 14 | 1. **Generate a tutorial as a `README.md` file** |
| 15 | Include the following sections: |
| 16 | - **Project Overview:** What the script does and why it's useful |
| 17 | - **Setup Instructions:** Prerequisites, dependencies, and how to run the script |
| 18 | - **How It Works:** A breakdown of the code logic based on the comments |
| 19 | - **Example Usage:** A code snippet showing how to use it |
| 20 | - **Sample Output:** (Optional) Include if the script returns visible results |
| 21 | - Use clear, readable Markdown formatting |