Comment Code

ProgrammingCharacter Prompts

This page contains the complete prompt template, ready to copy into a compatible language model. Related and popular prompts appear alongside it.

Writes comments for a code snippet, explaining what each line does and why, clearly and concisely enough to aid understanding.

Prompt content

**Statement of issues**:
You need to prepare an explanatory note for the given code clip to explain in detail the functions and functions of each line.

**Settlement steps**:
1. Analyses the input's code segment and understands its functionality and logic.
2. Adds a comment for each line to explain its specific role and purpose.
3. Ensure that the notes are clear, concise and understandable.

** Abstract Example**:
Input:
    ```python
    Snippets X
    ```
Expected output:
    ```python
    Snippets X
    # Comment A
    # Comment B
    # Comment C
    ```

Here's the code.: