Skip to content

Making decisions · ⁨做出判断⁩

English

Making a choice

  • if runs some code only when a condition is true.
  • The condition is followed by a colon :.
  • The lines that belong to the if are indented (4 spaces).
中文

做出选择

  • if 只有当条件为真时才会运行某段代码。
  • 条件后面要加一个冒号 :。
  • 属于这个 if 的代码行要缩进(4 个空格)。

Handout

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

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