Skip to main content
Engineering LibreTexts

1.4: Unit Summary

  • Page ID
    48197
  • \( \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}}\)

    In this unit, you have seen what an algorithm is. Based on this knowledge, you should now be able to characterize an algorithm by stating its properties. We have explored the different ways of representing an algorithm such as using human language, pseudo codes and flow chart. You should now be able to present solutions to problems in form of an algorithm.

    Unit Assessment

    The following section will test the learners understanding of this unit.

    Unit Revision

    Instructions

    Answer the following questions.

    1. Design an algorithm to add two numbers and display result.
    2. Write pseudocode to input the dimensions of a rectangle and print area and perimeter.
    3. Give an algorithm to find the maximum number.
    Feedback
    1. Can be written as below:

      Step 1: START ADD. Step 2: get values of a & b. Step 3: c ← a + b. Step 4: display c.

      step 5 − STOP

    1. The pseudocode is:
      read length, breadth
      area = length * breadth
      perimeter = 2*(length+breadth)
      display area, perimeter
      
    2. The solution is:

      Pick up the first number and suppose it is maximum.

      Pick up a number from the remaining numbers.

      Compare the picked number and current maximum.

      Throw out the smaller and suppose the larger one as the new maximum.

      Repeat 2~4 until there’s no number remaining.

      Output the current maximum.

    Grading Scheme

    The marks will be awarded as shown below

    question sub-question marks awarded
    1   2
    2 Any property listed award 1 mark, and explanation another 1 mark 6
    3 Each term correctly stated to be awarded 1 mark (maximum 6 statements) 6
    Total   14

    Unit Readings and Other Resources

    The readings in this unit are to be found at course level readings and other resources.


    1.4: Unit Summary is shared under a CC BY-SA license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?