FLOWCHART

Cards (14)

  • Flowchart
    >diagram that uses symbols to show a sequence of operations
    >uses shapes, arrows and lines
  • Terminal block - starting and ending points
    -stop, begin, start, end
  • Preparation or Initialization block
    -contains the initial value of variable
  • Input or output block
    -accept data for processing
    -display answer as output to the processed data
  • Action or process Block
    -process data by writing mathematical equations
  • Decision block
    -contains logical expressions
    -"yes" or "no"
  • On-page connector - flow continues where matching symbols have been placed on the same page
  • Off-page connectors - flow continues where matching symbols have been placed on another page
  • Flow line - direction of flow of logic in the program
  • Conditional statements
    • perform diff operations
    • 3 kinds
    >if statement - check if a specified condition is true
    >if-else statement - check if condition is true and performs an action if false
    >if-else-if-else - check if one or more blocks of code can be executed
  • Switch statement - select one of many blocks of code to be executed
  • if block - execute codes within set of braces if condition is satisfied
  • Code to be executed is only made up of one line and no need to enclosed in braces
  • Switch statement
    • like if statement
    • only one variable is taken to consideration
    • select one or more blocks of code
    • Use break statement to prevent it from continuously executing other blocks after it