Skip to content

Selection — IF and CASE · ⁨选择 —— IF 与 CASE⁩

English

Making a decision

  • Selection means choosing what to do, based on a test.
  • An if runs its block only when the test is true.
  • The test gives a Boolean: True or False.
中文

做一个决定

  • 选择(selection)就是根据一个测试来决定做什么。
  • if 只有当测试为真时才运行它的代码块。
  • 这个测试会给出一个布尔值:True 或 False。

Handout

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

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