home/productivity/task-011-prompt

Task 011 Prompt

GPTClaudeDeepSeek··217 copies·updated 2026-07-14
task-011-prompt.prompt
"Example 1:
Input: [1, -2, 3, 0] → Output: 2
Example 2:
Input: [-5, -1, 0] → Output: 0
Example 3:
Input: [10, 20, -1, 5] → Output: 3
Now write a function count_positives(nums) that counts how many elements of nums are greater than 0."

when to use it

Community prompt sourced from the open-source GitHub repo KCyrusNF/Prompting-Strategies-CodeGen-Study (MIT). A "Task 011 Prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

productivitycommunitydeveloper

source

KCyrusNF/Prompting-Strategies-CodeGen-Study · MIT