ノート

inferencesデバッグ&エラーフィックスプロンプト

フリーのプロンプト百科事典 Wikiprompt より

Alex Prompter

2025年2月23日

inferencesデバッグ&エラーフィックスプロンプト 空リストで失敗するPython関数をデバッグするようAIに依頼するプロンプトであり、根本原因の説明と修正を要求するもの。

プロンプト内容保存

🌐
The following Python script has a bug causing incorrect output. Identify and fix the issue while explaining the root cause. The code: def calculate_average(numbers): total = sum(numbers) return total / len(numbers) # Error occurs when numbers is an empty list print(calculate_average([])) # Should handle edge cases properly

ログインして完全なプロンプトを表示

次で続行:

ログインすると、次に同意したことになります: 利用規約 プライバシーポリシー

使い方

このプロンプトは coding 向けに設計されています。上の内容をコピーして、お好みの AI ツールに貼り付けてください。

最良の結果を得るには、プレースホルダー(角括弧や大文字で示された部分)を具体的な要件に置き換えてください。

参考資料

カテゴリ:coding| twitter| python| debugging

ノート