3.1.1 Representing algorithms

Cards (179)

  • What is an algorithm designed to solve?
    A specific problem
  • The finiteness of an algorithm means it must terminate after a finite number of steps
  • Visual representation of algorithms enhances clarity

    True
  • What does the process symbol in a flowchart represent?
    A single step
  • In a flowchart, a decision symbol represents a branching point.
  • What is the term for a set of instructions designed to solve a specific task?
    Algorithm
  • What is the minimum number of outputs an algorithm must have?
    One
  • Water boils at 100 degrees Celsius at standard atmospheric pressure
    True
  • An algorithm must have zero or more inputs
  • Match the characteristic of an algorithm with its description:
    Definiteness ↔️ Steps must be clear
    Finiteness ↔️ Must terminate after finite steps
    Effectiveness ↔️ Each step must be feasible
  • Visual representation of algorithms improves clarity and understanding.

    True
  • What does a "Process" symbol in a flowchart represent?
    A single step or operation
  • Steps to calculate the area of a rectangle using a flowchart
    1️⃣ Start
    2️⃣ Input length and width
    3️⃣ Calculate area = length x width
    4️⃣ Output area
    5️⃣ Stop
  • What does an "Input/Output" symbol in a flowchart represent?
    Data being entered or exited
  • Linear flowcharts depict processes with no branching or looping.

    True
  • Looping flowcharts include repetitive steps or cycles
  • Linear flowcharts are best suited for algorithms that involve straightforward, sequential processes with no branching or looping
  • Branching flowcharts are used to represent algorithms with decision points that depend on specific conditions
  • The choice of flowchart type depends on the complexity and structure of the algorithm being represented.
  • Representing algorithms is essential for clarity, communication, and efficiency.
  • Flowcharts are only useful for documenting simple algorithms.
    False
  • Branching and looping flowcharts are suitable for algorithms with conditional logic and repetitive steps.

    True
  • Linear flowcharts are best for algorithms with conditional logic and repetitive steps.
    False
  • An Input/Output symbol is used to indicate data being outputted in a flowchart.
    True
  • In the example of finding the maximum of three numbers, if num2 is greater than max, then max is updated to num2.

    True
  • Match the pseudocode element with its example:
    Variables ↔️ x = 10
    Loops ↔️ FOR i = 1 TO 5:
    Conditionals ↔️ IF x > 0 THEN:
  • Arrange the steps of adding two numbers in pseudocode:
    1️⃣ START
    2️⃣ INPUT a
    3️⃣ INPUT b
    4️⃣ sum = a + b
    5️⃣ OUTPUT sum
    6️⃣ END
  • The steps of an algorithm must be clear and unambiguous
  • Representing algorithms facilitates collaboration and documentation.

    True
  • Representing algorithms facilitates collaboration and documentation by providing a standard way to describe algorithms
  • Flowcharts use standardized symbols to depict the step-by-step flow of an algorithm.

    True
  • Match the flowchart component with its description:
    Process ↔️ Single step or operation
    Decision ↔️ Branching based on condition
    Input/Output ↔️ Data entry or exit
  • In a flowchart, the process symbol represents a single step or operation
  • Linear flowcharts depict processes with no branching or looping.

    True
  • In creating a flowchart, an input/output symbol indicates data being entered
  • What is pseudocode used for?
    Represent algorithms
  • Match the representation with its suitability for different algorithm tasks:
    Flowcharts ↔️ Understanding overall algorithm flow
    Pseudocode ↔️ Planning complex logic
  • What are three benefits of using comments in algorithms?
    Clarity, documentation, maintainability
  • To convert from a flowchart to pseudocode, you translate symbols into plain language instructions.
    True
  • An algorithm's steps must be clear and ambiguous
    True