Menu

Defensive Design - Word Drop

Drop the words into the correct position in the paragraph. Press submit to check your answers.

Defensive design means writing a program that keeps working correctly however it is used. Programmers must anticipate ______, that is users doing things the program was not designed for. They plan for all likely ______, for example text where a number is expected. A robust program checks every value instead of trusting the user.

Input ______ is the general checking of data to make sure it is sensible before the program uses it. It cannot show that the data is correct, only that it follows the rules. A ______ check rejects a value outside set limits, such as a mark of 150. Type, length and presence checks are other examples. Invalid data is rejected with an error ______, and a ______ repeats the request until a valid value is entered.

Authentication confirms the ______ of a user, that is who they are, before they may use a program. The usual simple method is a username and ______. Limiting the number of ______ stops someone repeatedly guessing the login details.

Maintainability is how easily a program can be read, understood and changed. Putting each task in its own ______ means code is written once and changed in one place. Following ______ gives variables meaningful names such as camelCase. Lines inside loops, selections and sub programs must be ______ because in Python this marks each block. A programmer adds ______ to explain what a section of code does, and the translator ignores them.
Log in or sign-up to access the word drop



Don't have a login?

You can still revise this topic