The problem consists of three parts: (vii) Identify the word processing tools used for formatting labeled A to D based on the given snippet. (ix) Convert the given pseudocode (While-Do loop) into Pascal code. (x) Convert a given Hexadecimal color code (#A945A3) to decimal values for Red, Green, and Blue.
2025/6/29
1. Problem Description
The problem consists of three parts:
(vii) Identify the word processing tools used for formatting labeled A to D based on the given snippet.
(ix) Convert the given pseudocode (While-Do loop) into Pascal code.
(x) Convert a given Hexadecimal color code (#A945A3) to decimal values for Red, Green, and Blue.
2. Solution Steps
(vii) Identifying Word Processing Tools
A: "History of Sri Lanka" - The font is bold. The tool used is 'B' (P). Therefore, A:P
B: "Democratic Socialist Republic of Sri Lanka" - This part of the text is italicized. The tool used is 'I' (Q). Therefore, B:Q
C: "
1. Buddhism;
2. Ancient Kingdom" - The text is in the form of a numbered list. The tool used is the numbered list icon (T). Therefore, C:T
D: "23rd September 2023" - The 'rd' is superscripted. The tool used is superscript (S). Therefore, D:S
(ix) Converting Pseudocode to Pascal Code
The given pseudocode is:
Begin
n = 1
do while n < 10
display n
n = n + 1
end while
end
The equivalent Pascal code using a while-do loop is:
```pascal
program WhileLoop;
var
n: integer;
begin
n := 1;
while n < 10 do
begin
writeln(n);
n := n + 1;
end;
end.
```
(x) Converting Hexadecimal Color Code to Decimal
The hexadecimal color code is #A945A
3. Red (A9): To convert from hexadecimal to decimal, we use the formula: $(digit1 * 16^1) + (digit2 * 16^0)$.
So,
Green (45):
Blue (A3):
3. Final Answer
(vii)
A: P
B: Q
C: T
D: S
(ix)
```pascal
program WhileLoop;
var
n: integer;
begin
n := 1;
while n < 10 do
begin
writeln(n);
n := n + 1;
end;
end.
```
(x)
RED: 169
GREEN: 69
BLUE: 163