Skip to main content
Engineering LibreTexts

26.9: Quiz Question Answers - Chapter 9

  • Page ID
    54418
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Quiz question answers for chapter 9 are as follows:

    1. When an exit statement is executed, the current loop will be exited, thus not completing any remaining iterations.
    2. There may be an unlimited number of exit statements. Typically, there is only one.
    3. When a cycle statement is executed, the remaining statements in the loop are skipped and the next iteration of the loop is started (from the beginning of the loop).
    4. There may be an unlimited number of cycle statements. Typically, there is only one.
    5. If there are multiple cycle statements, only the first executed cycle statement will be executed.
    6. The output is as follows:
      The SUM is: 15
    7. The output is as follows:
      start
      1    *    1    =    1
      1    *    2    =    2
      2    *    1    =    2
      2    *    2    =    4
      3    *    1    =    3
      3    *    2    =    6
      end
    8. The statements are valid, however since the initial value of i is greater than the stop value, no statements in the loop will be executed.
    9. The statements are valid, however since the initial value of i is greater than the stop value, no statements in the loop will be executed.
    10. There is no specified limit.
    11. When nesting IF statements, the nested IF statement must be completely nested within the loop.

    This page titled 26.9: Quiz Question Answers - Chapter 9 is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Ed Jorgensen via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.