Assignment Title: Understanding Algorithms and Algorithmic
Design Principles
Level: Beginner to Intermediate
Due Date: 18 April 2025
Total Marks: 50
Instructions: Answer all questions. Use examples where appropriate. Submit your
work in PDF or typed format. Each question carries the marks indicated.
Section A: Conceptual and Descriptive Questions (30 Marks)
1.Define the following terms (1 mark each):
a) Algorithm
b) Pseudocode
c) Flowchart
d) Computational Thinking
e) Efficiency (in context of algorithms) [5 marks]
2. List and briefly explain the four main characteristics of a good algorithm.
[4 marks]
3.Explain the difference between a linear and a non-linear algorithm. Provide one
example of each.
[4 marks]
4.Describe how control structures (sequence, selection, iteration) are used in
algorithms. Give an example of each.
[5 marks]
5.Explain the importance of stepwise refinement in algorithm design with an example.
[4 marks]
6.Discuss the role of abstraction and decomposition in algorithm design.
[4 marks]
7.Differentiate between top-down and bottom-up design approaches.
[4 marks]
Section B: Algorithm Writing and Tracing (20 Marks)
8.Trace the output of the following algorithm for input value n = 5:
total = 0
for i from 1 to n
total = total + i
print total
Show all working.
[3 marks]
9.Write a pseudocode to find the largest of three numbers input by the user.
[3 marks]
10.Design an algorithm using pseudocode to calculate the factorial of a given number.
[3 marks]
Given the problem: "Check if a number is prime", write:
A brief problem analysis
A suitable algorithm in pseudocode [5 marks]
11. Explain how time complexity influences the choice of algorithm. Give one
practical example. [3 marks]
12.Describe two real-world problems where algorithmic thinking is used to solve
everyday tasks. [3 marks]
13.Bonus (Optional): Research and write a short paragraph on any one famous
algorithm (e.g., Dijkstra's Algorithm, Binary Search, Merge Sort).
[Up to 5 bonus marks]
End of Assignment