home/productivity/task-018-prompt

Task 018 Prompt

GPTClaudeDeepSeek··674 copies·updated 2026-07-14
task-018-prompt.prompt
"Example 1:
Input: 0 → Output: 1
Example 2:
Input: 1 → Output: 1
Example 3:
Input: 4 → Output: 24
Now write a function factorial_iter(n) that computes the factorial of n using a loop."

when to use it

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