Passer au contenu

Lesson 40: Check the input

English

Stop bad data

  • A machine that gets a silly value can break: a speed of 500, or a door code with a letter in it.
  • Validation is an automatic check that the data is sensible before the program uses it.
  • Then you test the check with good and bad data.

Words for this lesson

Word Meaning
range check the value is between a lowest and a highest value
length check the data has the right number of characters
type check the data is the right kind, for example only digits
test data values you type to see if the program works

Se connecter ou créer un compte

IGCSE, A-Level & AP