100% found this document useful (1 vote)
487 views4 pages

Grade 10 Practical Term 3 Memo

This document contains instructions and sample code for a practical IT exam for grade 10 students. It includes 4 programming questions that demonstrate loops, variables, and math functions. It also includes a registration form code sample that displays subject and calculates registration cost based on radio button selection.

Uploaded by

braceface0abm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
487 views4 pages

Grade 10 Practical Term 3 Memo

This document contains instructions and sample code for a practical IT exam for grade 10 students. It includes 4 programming questions that demonstrate loops, variables, and math functions. It also includes a registration form code sample that displays subject and calculates registration cost based on radio button selection.

Uploaded by

braceface0abm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

QUEEN’S COLLEGE BOYS’ HIGH SCHOOL

INFORMATION TECHNOLOGY
SEPTEMBER 2023
PRACTICAL TEST
GRADE 10

EXAMINER: MISS THEUNISSEN TIME: 1 HOUR


MODERATOR: MR MUZA MARKS: 50

MARKING GUIDELINE

This paper consists of 4 pages including the title


------------------------------------------------------------------------------------------------------------
Question 1.1
procedure TForm1.btnQuestion11Click(Sender: TObject);
var
i, iRand, x: integer; √
begin
x:=0; √
for i := 1 to 10 do√
begin
iRand := RandomRange(1,101); √
if (iRand mod 2 = 0) then√
begin
x := x + 1; √
redout.Lines.Add(inttostr(x) √ + #9 √+ inttostr(iRand)); √
end;
end; (9)
----------------------------------------------------------------------------------------------------------------
Question 1.2
procedure TForm1.btnQuestion12Click(Sender: TObject);
var
c : char; √
i : integer;
begin
i := 0; √
for c := 'A' to 'Z' do√
begin
i := i + 1; √
redout.Lines.Add(inttostr √ (i) √+ #9 + c); √
end;
end; (7)
----------------------------------------------------------------------------------------------------------------
Question 1.3
procedure TForm1.btnQuestion13Click(Sender: TObject);
var
i, x, j : integer;
star : string;
begin
i:=1; √
while (i<=5) do√
begin
star := ' '; √
for j := 1 to i do√
begin
star := star + '*'√
end;
redout.Lines.Add(inttostr(i) √ + ' ' + star); √
i := i + 1; √
end;
end; (8)
----------------------------------------------------------------------------------------------------------------
Question 1.4
procedure TForm1.btnQuestion14Click(Sender: TObject);
var
i, isum, isqr : integer; √
rsqrt : real;
begin
isum := 0; √
isqr := 0; √
rsqrt:= 0; √
redout.Lines.Add('NO' + #9 + 'SQR' + #9+ 'SQRT'); √
for i := 1 to 10 do√
begin
isum := i + i; √
isqr := sqr(i); √
rsqrt:= sqrt(i); √
redout.Lines.Add(inttostr √ (isum) √ + #9 + inttostr(isqr) √ + #9 +
floattostrF √ (rsqrt,ffFixed, 3,1)); √
end; (14)
end;

Question 2
BtnDisplayClick
var sSubject, sCategory:string;
rReg:real; √
begin
sSubject:=lbxCategory.Items[lbxCategory.ItemIndex]; √√
case √rgpChoice.ItemIndex of√
0: rReg:=30.00; √
1:rReg:=50.00; √
end;
redoutput.Lines.Add('Olympiad Registration'); √
redoutput.Lines.Add('_____________________'); √
redoutput.Lines.Add('Registration for : '+sSubject); √
redoutput.Lines.Add('Cost '+floattostrf√ (RReg,ffcurrency,8,2)); √
end;
(12)

You might also like