Cards (19)

  • Selection is code that follows a different sequence based on what condition is chosen.
  • Criteria is the specific rules that are used by the program to recognise if a condition is TRUE or FALSE. The singular form of criteria is criterion.
  • IF statements are statements that allow a program to follow a program to follow or ignore a sequence of code depending on a Boolean condition.
  • CASE statements are a simple method of providing multiple paths through the code based on a single variable or user input.
  • A condition is the criteria that are tested as part of the execution of the code. The condition will result in either a True or False answer when tested.
  • Nested IF statements are IF statements with the ability for additional conditions to be checked once earlier conditions have determined a path.
  • ELSEIF statements are an alternative to nested IF statements. Each condition is tested in turn. When a condition is TRUE, the code related to that condition is executed and the statement is ended.
  • AND Boolean operators are used to create a condition which is made up from more than one criteria. The condition will only be TRUE if all of the individual criteria are TRUE.
  • OR Boolean operators are used to create a condition which is made up from more than one criteria. The condition will be TRUE if any of the individual criteria are TRUE.
  • NOT Boolean operators are used to create a condition which will be TRUE when the criteria are FALSE.
  • Selection provides methods that programmers can use to allow the algorithm to follow different paths through the code depending on the data being used at the time.
  • The flowchart symbol for selection is a decision diamond. The selection criteria are included in the symbol. The exit paths should be indicated as TRUE or FALSE.
  • Multiple decisions are shown as a series of connected decisions.
  • Logical operators are used to provide a range of comparative options.
  • Nested IF statements provide the ability for additional conditions to be checked once earlier conditions have determined a path.
  • ELSEIF statements are an alternative to nested IF statements. Each condition is tested in turn. When a conditional is TRUE, the code related to that condition is executed and the statement is ended.
  • CASE statements provide a simple method of providing multiple paths based on a single variable or user input.
  • The ELSE statement (used with IF) and the OTHERWISE statement (used with CASE) provide a default path should none of the conditions be met.
  • Boolean operators can be used with IF statements to provide the ability to use complex conditions based on multiple variables or user inputs.