Bỏ qua nội dung

Lesson 37: Safe moves

English

Check before you move

  • Data can be wrong: too big, below zero, missing, or a word instead of a number.
  • Validation is a check the computer does before it uses the data.
  • Bad data is rejected with a message; good data is used.

Words for this lesson

Word Meaning
range check the value is between a lowest and a highest value
presence check something was entered (it is not empty)
type check the value is the right data type, e.g. a whole number
test data values chosen to test the checks

Đăng nhập hoặc tạo tài khoản

IGCSE, A-Level & AP