E 计算机知识测验和游戏

调试测验

Python 调试测验

指示: 选择每个问题的最佳答案并单击 提交测验.

1.什么是调试




2、哪个函数显示调试信息




3. 由于Python语法不正确而出现以下错误




4. 哪种工具可以让您暂停代码并检查变量?




5. 当变量未定义时,会发生什么错误?




6. 除以零时会出现哪种错误




7.这段代码打印什么

x = 5
print(x)



8. 断点为何有用




9.什么是逻辑错误




10. 调试时第一步是什么




"; }else{ output+="
"+question.toUpperCase()+" ✘ Incorrect (Correct Answer: "+answers[question].toUpperCase()+")
"; } }else{ output+="
"+question.toUpperCase()+" Not Answered
"; } } let percentage=(score/10)*100; output+="
"; output+="

Score: "+score+" / 10

"; output+="

Percentage: "+percentage+"%

"; if(percentage>=90){ output+="

Outstanding! 🏆

"; } else if(percentage>=70){ output+="

Good Job! 👍

"; } else{ output+="

Keep Practicing! 📚

"; } document.getElementById("results").style.display="block"; document.getElementById("results").innerHTML=output; window.scrollTo({ top:document.body.scrollHeight, behavior:"smooth" }); }