Skip to main content
Engineering LibreTexts

26.5: Quiz Question Answers - Chapter 5

  • Page ID
    54414
  • \( \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 5 are as follows:

    1. The assignment operator is = (equal sign).
    2. The exponentiation operator is ** (double asterisks, no space).
    3. An integer variable can be converted to a real with the real conversion function. For example,
      realVar = real(intVar)
    4. An integer variable can be converted to a real with the real conversion function. For example,
      intVar = int(realVar)
      Note, in this example precision may be lost since the fractional part is truncated (not rounded).
    5. The two logical constants are .true. and .false. which must include the leading and trailing periods.
    6. Some intrinsic functions are real(), int(), nint(), cos(), sin(), mod(), tan(), and sqrt(). There are more as listed in Appendix D.
    7. The statements are as follows:
      x1 = (pi / 6.0) * (3.0 * a**2 + 3.0 * b**2 + c**2)
      x2 = -(2.0 * a / c) * cos(b) * sin(b)
      x3 = (-b + sqrt(b**2 – 4.0 * a * c)) / (2.0 * a)

    This page titled 26.5: Quiz Question Answers - Chapter 5 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.