The problem consists of three parts. (5i) Complete the pseudo code to display the first ten triangular numbers (1, 3, 6, 10, ..., 55). (5ii) Evaluate a student's grade based on their Tamil and Maths marks using a provided pseudo code. (7iii) Determine the last three output values from the given Pascal code.
2025/5/6
1. Problem Description
The problem consists of three parts.
(5i) Complete the pseudo code to display the first ten triangular numbers (1, 3, 6, 10, ..., 55).
(5ii) Evaluate a student's grade based on their Tamil and Maths marks using a provided pseudo code.
(7iii) Determine the last three output values from the given Pascal code.
2. Solution Steps
(5i) Triangular Numbers Pseudo Code
The triangular numbers are the sum of consecutive natural numbers.
1 = 1
3 = 1 + 2
6 = 1 + 2 + 3
10 = 1 + 2 + 3 + 4
So, the pseudo code should calculate the sum and increment the number being added.
A - 1
B - 10
C - Num
D - Num
E - Sum
Explanation of each variable:
Sum: Stores the sum of the triangular number series.
Num: Represents which triangular number we are computing. It starts at 1 and ends at
1
0. The loop adds the number to the sum in each iteration and prints it.
(5ii) Student Grade Evaluation
Kavitha:
Average =
Output: Kavitha, "Fail"
Sunil:
Average =
Output: Sunil, "Pass"
Rajan:
Average =
Output: Rajan, "Pass"
Geetha:
Average =
Output: Geetha, "Fail"
Nimal:
Average =
Output: Nimal, "Pass"
(7iii) Pascal Code Output
The Pascal code calculates and prints the square of while is less than or equal to 10, incrementing by 2 in each iteration.
Initialization:
Loop 1: (True), Output: ,
Loop 2: (True), Output: ,
Loop 3: (True), Output: ,
Loop 4: (True), Output: ,
Loop 5: (True), Output: ,
Loop 6: (False), End Loop.
The last three outputs are 25, 49, and
8
1.
3. Final Answer
(5i)
A - 1
B - 10
C - Num
D - Num
E - Sum
(5ii)
Kavitha, "Fail"
Sunil, "Pass"
Rajan, "Pass"
Geetha, "Fail"
Nimal, "Pass"
(7iii)
25
49
81