Write a [language] code example that accomplishes the following task: [describe the task or algorithm]. Ensure the code is well-commented and follows best practices.
A prompt for generating code examples that accomplish a specific programming task or algorithm. Use this when you need a quick, clear code sample for a particular use case.