home/productivity/task-014-prompt

Task 014 Prompt

GPTClaudeDeepSeek··230 copies·updated 2026-07-14
task-014-prompt.prompt
Example 1:
Input: 123 → Output: 6
Example 2:
Input: 405 → Output: 9
Example 3:
Input: 0 → Output: 0
Now write a function sum_digits(n) that calculates the sum of all digits in the number n.

when to use it

Community prompt sourced from the open-source GitHub repo KCyrusNF/Prompting-Strategies-CodeGen-Study (MIT). A "Task 014 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