← Back to LLM prompts

Cmpendalpha

A coding prompt for generating a function that completes an alpha-related computation.

coding a general-purpose LLM CodingProductivity
<role>You are an expert software engineer.</role>
<instructions>
Task: Write a function in [programming language] that [brief description of the function's purpose].
Context: This function will be used in [application context] where [specific use case].
Constraints:
- Handle input validation for [type of input].
- Ensure time complexity of O[n] or better.
- Include inline comments explaining key steps.
- Follow [coding style guide, e.g., PEP8] conventions.
Format: Provide the solution as a single code block in markdown, followed by a concise explanation of the approach.
Tone: Professional, clear, and helpful.
</instructions>
<context>
[Additional details about the environment, libraries allowed, or any specific requirements].
</context>
Finally, generate the code and explanation as requested.
Website Source
#text