Skip to content

Errors & testing · ⁨错误与测试⁩

English

Three kinds of error

  • A syntax error breaks the rules of Python, so the code will not run.
  • A runtime error crashes the program while it is running.
  • A logic error runs fine but gives the wrong answer.
中文

三种错误

  • 语法错误(syntax error)违反了 Python 的规则,代码根本无法运行。
  • 运行时错误(runtime error)在程序运行过程中让它崩溃。
  • 逻辑错误(logic error)能正常运行,但给出错误的答案。

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩