6 Security, Privacy & Data Integrity · 3 Q

1 9618_s21_qp_11_Q6(a) 1 mark

Each of the following algorithms performs data validation.

State the type of validation check that each of the following algorithms performs.

(a)

INPUT x
IF x < 0 OR x > 10 THEN
  OUTPUT "Invalid"
ENDIF
2 9618_s21_qp_11_Q6(b) 1 mark

(b)

INPUT x
IF x = "" THEN
  OUTPUT "Invalid"
ENDIF
3 9618_s21_qp_11_Q6(c) 1 mark

(c)

INPUT x
IF NOT(x = "Red" OR x = "Yellow" OR x = "Blue") THEN
  OUTPUT "Invalid"
ENDIF