Mock
hlayiso mock exams
Practice Series:
Grade 10 Exam Preparation
WWW.HLAYISO.COM
NATIONAL
SENIOR CERTIFICATE
GRADE 10
INFORMATION TECHNOLOGY P1
NOVEMBER EXAMINATION 2026 (MOCK)
MARKING GUIDELINES
MARKS: 120
These marking guidelines consist of 25 pages.
Copyright reserved Please turn over
Skip to contentAll 2026 papers 





View all





Information Technology Grade 10 P1 2026 Memo (Eng)
Grade 10 Information Technology Paper 1 memorandum from the November Mock Exam 2 2026 (English), 25 pages. Read online or download the free PDF.
Information Technology · Grade 10 · November Mock Exam 2 · 2026 · English. Memorandum, 25 pages. Read online or download the PDF.
- Subject
- Information Technology
- Grade
- Grade 10
- Language
- English
- Document type
- Memorandum
- Year
- 2026
- Exam period
- November Mock Exam 2
- Paper
- 1
- Publisher
- Hlayiso
- Curriculum
- CAPS
- Pages
- 25
- File size
- 185.4 KB
Free to read online, no sign-up needed
Loading document…
Loading document…
1 of 25
This exam
November Mock Exam 2 2026
- Paper 1Question paperMemo
- Paper 2Question paperMemo
Document textSearch extracted text and jump to a page.
Information Technology/P1 2 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
GENERAL INFORMATION:
• These marking guidelines are to be used as the basis for the marking session. Markers
should discuss the guidelines before marking to ensure that they are consistently
interpreted and applied.
• Learners who provide an alternative correct solution to the one given in the marking
guidelines must be given full credit for the relevant solution, unless the specific instructions
in the paper were not followed or the requirements of the question were not met.
• Annexures A, B, C and D contain the marking grid for each question.
• Annexures E, F, G and H contain examples of solutions for QUESTION 1 to QUESTION
4 in programming code. The complete model-solution projects are supplied in the folder
mock2memo_p1_solutions.
• Copies of Annexures A, B, C and D and the summary of the learner’s marks should be
made for each learner and completed during the marking session.
• Code that is not executed (e.g. because of syntax errors in another part of the program)
must still be marked, but marks are only awarded for statements that are logically correct.
• Where a value is displayed in the wrong component or with a minor formatting difference
(e.g. a missing space), award the mark for the calculation but not for the display.
• Built-in routines that do the work the question asks for (e.g. Ceil, CharInSet) earn NO
marks for that part of the question.
Copyright reserved Please turn over
Information Technology/P1 3 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
ANNEXURE A
QUESTION 1: MARKING GRID – GENERAL PROGRAMMING SKILLS
CENTRE NUMBER: EXAMINATION NUMBER:
QUESTION DESCRIPTION MAX. LEARNER’S
MARKS MARKS
1.1 Button [1.1 - Set up] 7
lblQ1_1.Caption := 'Zola Car Wash' ✓
lblQ1_1.Font.Size := 16 ✓
lblQ1_1.Font.Style := [fsBold] ✓
lblQ1_1.Font.Color := clBlue ✓
imgQ1_1.Picture.LoadFromFile('carwash.bmp')
✓
imgQ1_1.Stretch := True ✓
cmbQ1_2.Items.Add('Minibus taxi') ✓
Also ACCEPT: Proportional := True together with
Stretch; a full path to the picture.
1.2 Button [1.2 - Wash cost] 10
if (rgpQ1_2.ItemIndex = -1) OR
(cmbQ1_2.ItemIndex = -1) then ✓
display the message and Exit ✓
case rgpQ1_2.ItemIndex of: 60, 95, 150 ✓✓
SUV/Bakkie (item 1): rCost := rCost * 1.2 ✓
Minibus taxi (item 2): rCost := rCost * 1.5 ✓
if chkQ1_2.Checked then ✓
rCost := rCost + WAX_PRICE ✓
Display ’Cost of the wash: ’ and the cost in lblQ1_2 ✓
in currency format with 2 decimal places ✓
Also ACCEPT: IF statements instead of CASE; rCost +
rCost * 20 / 100; testing cmbQ1_2.Text;
FloatToStrF(rCost, ffCurrency, 8, 2).
Test values: basic wash, car, wax → R95.00; full wash,
SUV/Bakkie, wax → R149.00; full valet, minibus taxi, no wax
→ R225.00.
NOTE: Wax added before the surcharge (e.g. R156.00 for the
example): lose the mark for the wax addition.
Copyright reserved Please turn over
Information Technology/P1 4 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
QUESTION DESCRIPTION MAX. LEARNER’S
MARKS MARKS
1.3 Button [1.3 - Change] 7
Extract both amounts and convert to integer (StrToInt) ✓
if iPaid < iDue then display the message and Exit ✓
iChange := iPaid - iDue and display ’Change: R’ and
the change ✓
Number of R50 notes: iChange DIV 50 ✓
Remainder: iChange := iChange MOD 50 ✓
Same DIV/MOD process for R20, R10, R5, R2 and R1 ✓
Display the number of each note and coin with labels in
memQ1_3 ✓
Also ACCEPT: a separate variable for each remainder; R1
coins as iChange MOD 2 after the R5 step.
Test value: due R155, paid R300 → change R145: 2, 2, 0, 1, 0,
0.
NOTE: Repeated subtraction in loops instead of DIV/MOD:
max 5.
1.4 Button [1.4 - Water in tank] 6
Extract the diameter and height and convert to real
(StrToFloat) ✓
Radius: rDiameter / 2 ✓
Volume: Pi * Sqr(rRadius) * rHeight ✓
Litres: volume * 1000 ✓
Vehicles: Trunc(rLitres / LITRES_PER_CAR) ✓
Display the litres rounded (Round) and the number of
vehicles with text in the two labels ✓
Also ACCEPT: 3.14 or 22/7 for π (answer 3815 or 3819
litres); rRadius * rRadius; Round(rLitres) DIV 85;
FormatFloat('0', rLitres).
Test value: diameter 1.8 m, height 1.5 m → 3817 litres, 44
vehicles.
NOTE: Using Round for the number of vehicles (gives 45):
lose the mark for the vehicles.
Copyright reserved Please turn over
Information Technology/P1 5 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
QUESTION DESCRIPTION MAX. LEARNER’S
MARKS MARKS
1.5 Button [1.5 - Bonus numbers] 5
Three random numbers: Random(9) + 1 ✓
Display the three numbers in lblQ1_5_Nums ✓
if (iNum1 = iNum2) AND (iNum2 = iNum3) then
’Jackpot - FREE WASH!’ ✓
Nested/compound selection to find the largest number ✓
Display ’Largest number: ’ and the largest number in
lblQ1_5_Result ✓
Also ACCEPT: RandomRange(1, 10); assigning iLargest
:= iNum1 and then two IF statements to replace it.
NOTE: The built-in Max function: NO mark for determining the
largest number.
TOTAL QUESTION 1: 35
Copyright reserved Please turn over
Information Technology/P1 6 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
ANNEXURE B
QUESTION 2: MARKING GRID – SELECTION AND STRING MANIPULATION
CENTRE NUMBER: EXAMINATION NUMBER:
QUESTION DESCRIPTION MAX. LEARNER’S
MARKS MARKS
2.1 Button [2.1 - ID details] 11
Test that the length is 13 ✓
Loop through every character of the ID number ✓
test whether the character is a digit, e.g. sID[i] in
['0'..'9'] ✓
If invalid: display ’Invalid ID number’ and Exit ✓
Extract YY: Copy(sID, 1, 2) and convert to integer ✓
if iYY <= 26 then 2000 + YY, otherwise 1900 + YY ✓
Date of birth as DD/MM/YYYY: Copy(sID, 5, 2) + '/'
+ Copy(sID, 3, 2) + '/' + sYear ✓
Extract digits 7 to 10: Copy(sID, 7, 4) ✓
less than 5000: Female, otherwise Male ✓
Digit 11: ’0’ = South African citizen, otherwise Permanent
resident ✓
Display the three lines with labels in memQ2_1 ✓
Also ACCEPT: a Boolean flag or a counter of non-digits;
(sID[i] >= '0') AND (sID[i] <= '9'); testing only
sID[7] < '5' for the gender; '19' + Copy(...).
Test values: 0803155081084 → 15/03/2008, Male, South
African citizen; 9811240263188 → 24/11/1998, Female,
Permanent resident; 98112402631 → Invalid ID number.
Copyright reserved Please turn over
Information Technology/P1 7 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
QUESTION DESCRIPTION MAX. LEARNER’S
MARKS MARKS
2.2 Button [2.2 - Membership code] 8
Find the space and extract the surname: Copy(sName,
Pos(' ', sName) + 1, ...) ✓
Convert to upper case (UpperCase) ✓
First letter of the first name in upper case:
UpperCase(sName[1]) ✓
Loop through the characters of the surname ✓
if NOT (sSurname[i] in ['A', 'E', 'I', 'O',
'U']) then add the letter ✓
Add the first two digits of the ID number:
Copy(edtQ2_1.Text, 1, 2) and '-' ✓
Random number: Random(900) + 100 converted to string
✓
Display ’Membership code: ’ and the code in lblQ2_2 ✓
Also ACCEPT: Delete to remove the vowels;
RandomRange(100, 1000); upper case applied to the whole
code at the end.
Test value: ’Kagiso Mabuza’, 0803155081084 →
KMBZ08-<random 100..999>.
Copyright reserved Please turn over
Information Technology/P1 8 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
QUESTION DESCRIPTION MAX. LEARNER’S
MARKS MARKS
2.3 Button [2.3 - Review analysis] 11
Extract the review, add a space at the end (or test the last
word after the loop), initialise counters/word ✓
for i := 1 to Length(sReview) do ✓
if the character is a letter (upper or lower case) ✓
add it to the current word and increment the letter
counter ✓
else if the character is a space ✓
if sWord <> '' (ignores multiple spaces): increment
the word counter ✓
if the word is longer than the longest word so far, store it
✓
reset the current word ✓
No words: display ’Enter a review’ and Exit ✓
Average: iLetters / iWords; level: < 4.5 Easy, < 6
Moderate, else Challenging ✓
Display the five lines in memQ2_3, average to 1 decimal
place ✓
Also ACCEPT: counting the length of each word in an integer
variable; Pos(' ', ...)/Copy/Delete to extract the words
(then a loop through each word to count letters) - still ONE
main loop expected, max 10 if two separate full passes;
counting space-separated tokens as words if the review
contains only letters and punctuation attached to words.
Test values: ’Reading this book made my holiday truly
unforgettable!’ → 8 words, 46 letters, unforgettable (13), 5.8,
Moderate. ’A fun read, but the end was sad.’ (with TWO spaces
after the comma) → 8 words, 23 letters, read (4), 2.9, Easy.
NOTE: Punctuation counted as letters: lose the letter-test mark.
TOTAL QUESTION 2: 30
Copyright reserved Please turn over
Information Technology/P1 9 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
ANNEXURE C
QUESTION 3: MARKING GRID – LOOPS
CENTRE NUMBER: EXAMINATION NUMBER:
QUESTION DESCRIPTION MAX. LEARNER’S
MARKS MARKS
3.1 Button [3.1 - Digits] 7
Extract the number and convert to integer; initialise count,
sum and reverse to 0 ✓
while iNumber > 0 do ✓
iDigit := iNumber MOD 10 ✓
Increment the count and add the digit to the sum ✓
iReverse := iReverse * 10 + iDigit ✓
iNumber := iNumber DIV 10 ✓
Display the three results with text in memQ3 ✓
Also ACCEPT: repeat ... until iNumber = 0.
Test value: 40725 → 5 digits, sum 18, reversed 52704.
(Numbers ending in 0 lose the leading zero when reversed,
e.g. 120 → 21: accept.)
NOTE: Converting the number to a string: NO marks for the
loop, MOD and DIV lines (max 2).
3.2 Button [3.2 - Factors] 8
Extract the number from the spin edit; initialise the sum and
output string ✓
for iFactor := 1 to iNumber do ✓
if iNumber MOD iFactor = 0 then ✓
add the factor to the output string ✓
if the factor is smaller than the number, add it to the
sum ✓
Display the factors on ONE line and the sum, with text ✓
if iSum = iNumber: PERFECT ✓
else if iSum > iNumber: ABUNDANT, else
DEFICIENT ✓
Also ACCEPT: loop to iNumber - 1 with the number itself
added after the loop; subtracting the number from the total
sum.
Test values: 28 → 1 2 4 7 14 28, sum 28, PERFECT; 36 → sum
55, ABUNDANT; 16 → sum 15, DEFICIENT; 6 → PERFECT.
Copyright reserved Please turn over
Information Technology/P1 10 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
QUESTION DESCRIPTION MAX. LEARNER’S
MARKS MARKS
3.3 Button [3.3 - Times-table quiz] 8
Initialise the counter of correct answers to 0 ✓
for i := 1 to NUM_QUESTIONS do ✓
Two random numbers: Random(11) + 2 ✓
InputBox showing the question; answer converted with
StrToInt ✓
if iAnswer = iNum1 * iNum2 then ✓
increment the counter and display the line with ’Correct’
✓
else display the line with ’Wrong’ and the correct answer
in brackets ✓
After the loop: score and percentage (iCorrect / 5 *
100, 0 decimals) ✓
Also ACCEPT: RandomRange(2, 13); Round(iCorrect
* 100 / NUM_QUESTIONS); iCorrect * 20.
NOTE: Random(12) + 1 (range 1 to 12): lose the random
mark.
3.4 Button [3.4 - Price drop] 7
Extract the price (StrToFloat) and the months
(spnQ3_4.Value) ✓
Keep a copy of the original price ✓
for iMonth := 1 to spnQ3_4.Value do ✓
rPrice := rPrice - rPrice * DROP / 100 ✓
Display month, #9 and price in currency format (2
decimals) ✓
After the loop: drop in value = original price − final value ✓
displayed with ’Total drop in value: ’ in currency format ✓
Also ACCEPT: rPrice := rPrice * 0.92; rPrice * (1
- DROP / 100).
Test value: R12 000, 6 months → R11 040.00, R10 156.80,
R9 344.26, R8 596.72, R7 908.98, R7 276.26; total drop in
value R4 723.74.
NOTE: 8% of the ORIGINAL price every month (R6 240.00
after 6 months): lose the drop-calculation mark.
TOTAL QUESTION 3: 30
Copyright reserved Please turn over
Information Technology/P1 11 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
ANNEXURE D
QUESTION 4: MARKING GRID – PROBLEM SOLVING
CENTRE NUMBER: EXAMINATION NUMBER:
QUESTION DESCRIPTION MAX. LEARNER’S
MARKS MARKS
4.1 Button [4.1 - Parking fee] 10
Entry time: hours Copy(sIn, 1, Pos(':', sIn) - 1)
and minutes Copy(sIn, Pos(':', sIn) + 1, 2),
converted to minutes (hours * 60 + minutes) ✓
Exit time extracted and converted in the same way ✓
if iOut <= iIn then message and Exit ✓
if iMinutes <= 30 then fee 0 ✓
else if iMinutes <= 60 then fee FIRST_HOUR ✓
Extra minutes after the first hour: number of blocks iExtra
DIV 30 ✓
if iExtra MOD 30 > 0 then Inc(iBlocks) ✓
rFee := FIRST_HOUR + iBlocks * HALF_HOUR,
limited to DAY_MAX ✓
Display the time parked as hours (DIV 60) and minutes
(MOD 60) ✓
Display the fee in currency format ✓
Also ACCEPT: Delete to remove the hours part; (iExtra +
29) DIV 30; a loop that adds R6 per 30-minute block.
Test values: 08:45–11:20 → 2 h 35 min, R36.00; 9:10–9:35 →
0 h 25 min, R0.00; 13:00–14:00 → 1 h 0 min, R12.00;
13:00–14:01 → R18.00; 07:05–18:40 → 11 h 35 min, R90.00
(maximum).
NOTE: Copy(sIn, 1, 2) for the hours works only for
two-digit hours: lose ONE mark (9:10 must work). Ceil: no
mark for the round-up line.
Copyright reserved Please turn over
Information Technology/P1 12 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
QUESTION DESCRIPTION MAX. LEARNER’S
MARKS MARKS
4.2 Button [4.2 - Number plate] 7
Loop THREE times for the letters ✓
Conditional loop (repeat ... until / while) ✓
random uppercase letter: Chr(Random(26) + 65) ✓
until the letter is NOT a vowel ✓
add the letter to the plate; then add a space ✓
THREE random digits Random(10) converted to string and
added ✓
Add ' GP' and display ’Number plate: ’ and the plate in
memQ4 ✓
Also ACCEPT: a string of the 21 consonants with a random
position (Random(21) + 1) - max 6 (no conditional loop);
RandomRange(65, 91).
NOTE: The vowel test may use in
['A','E','I','O','U'] or Pos(cLetter, 'AEIOU') >
0.
4.3 Button [4.3 - Hourly cars] 8
First input with InputBox and StrToInt before the loop
(or at the top of a repeat loop) ✓
while iCars <> -1 do ✓
if (iCars < 0) OR (iCars > MAX_CARS):
ShowMessage('Invalid number of cars') ✓
else increment the hour counter and add to the total ✓
display ’Hour <n>: <cars> cars’ ✓
if iCars < iFewest: store the number of cars and
the hour (iFewest initialised to MAX_CARS + 1) ✓
Next input inside the loop ✓
After the loop: ’No data was entered’ if no hours, otherwise
total, quietest hour and average (iTotal / iHour, 1
decimal) ✓
Also ACCEPT: a repeat loop with the processing inside an
if iCars <> -1; the message added to memQ4; initialising
the fewest cars with the first valid value (e.g. if (iHour =
1) OR (iCars < iFewest)).
Test value: 45, 62, 250, 38, 71, 54, −1 → 250 rejected; 5
hours, total 270, quietest Hour 3 (38 cars), average 54.0.
NOTE: Dividing by zero when −1 is entered first: lose the last
mark. Initialising the fewest cars to 0 (never replaced): lose the
mark for storing the quietest hour.
TOTAL QUESTION 4: 25
Copyright reserved Please turn over
Information Technology/P1 13 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
SUMMARY OF LEARNER’S MARKS:
CENTRE NUMBER: EXAMINATION NUMBER:
QUESTION 1 QUESTION 2 QUESTION 3 QUESTION 4 GRAND TOTAL
MAX. MARKS 35 30 30 25 120
LEARNER’S MARKS
Copyright reserved Please turn over
Information Technology/P1 14 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
ANNEXURE E: SOLUTION FOR QUESTION 1
// ===========================================================================
// Provided code
// ===========================================================================
procedure TfrmQuestion1.FormCreate(Sender: TObject);
begin
FormatSettings.DecimalSeparator := '.';
Randomize;
end;
// ===========================================================================
// Question 1.1 7 marks
// ===========================================================================
procedure TfrmQuestion1.btnQ1_1Click(Sender: TObject);
begin
lblQ1_1.Caption := 'Zola Car Wash';
lblQ1_1.Font.Size := 16;
lblQ1_1.Font.Style := [fsBold];
lblQ1_1.Font.Color := clBlue;
imgQ1_1.Picture.LoadFromFile('carwash.bmp');
imgQ1_1.Stretch := True;
cmbQ1_2.Items.Add('Minibus taxi');
end;
// ===========================================================================
// Question 1.2 10 marks
// ===========================================================================
procedure TfrmQuestion1.btnQ1_2Click(Sender: TObject);
const
WAX_PRICE = 35;
var
rCost: Real;
begin
if (rgpQ1_2.ItemIndex = -1) OR (cmbQ1_2.ItemIndex = -1) then
begin
ShowMessage('Select the type of wash and the vehicle');
Exit;
end;
case rgpQ1_2.ItemIndex of
0: rCost := 60;
1: rCost := 95;
else
rCost := 150;
end;
if cmbQ1_2.ItemIndex = 1 then
rCost := rCost * 1.2
else if cmbQ1_2.ItemIndex = 2 then
rCost := rCost * 1.5;
if chkQ1_2.Checked then
rCost := rCost + WAX_PRICE;
lblQ1_2.Caption := 'Cost of the wash: ' + FormatFloat('R 0.00', rCost);
end;
// ===========================================================================
// Question 1.3 7 marks
// ===========================================================================
procedure TfrmQuestion1.btnQ1_3Click(Sender: TObject);
Copyright reserved Please turn over
Information Technology/P1 15 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
var
iDue, iPaid, iChange: Integer;
begin
memQ1_3.Clear;
iDue := StrToInt(edtQ1_3_Due.Text);
iPaid := StrToInt(edtQ1_3_Paid.Text);
if iPaid < iDue then
begin
ShowMessage('Not enough money paid');
Exit;
end;
iChange := iPaid - iDue;
memQ1_3.Lines.Add('Change: R' + IntToStr(iChange));
memQ1_3.Lines.Add('R50 notes: ' + IntToStr(iChange DIV 50));
iChange := iChange MOD 50;
memQ1_3.Lines.Add('R20 notes: ' + IntToStr(iChange DIV 20));
iChange := iChange MOD 20;
memQ1_3.Lines.Add('R10 notes: ' + IntToStr(iChange DIV 10));
iChange := iChange MOD 10;
memQ1_3.Lines.Add('R5 coins: ' + IntToStr(iChange DIV 5));
iChange := iChange MOD 5;
memQ1_3.Lines.Add('R2 coins: ' + IntToStr(iChange DIV 2));
memQ1_3.Lines.Add('R1 coins: ' + IntToStr(iChange MOD 2));
end;
// ===========================================================================
// Question 1.4 6 marks
// ===========================================================================
procedure TfrmQuestion1.btnQ1_4Click(Sender: TObject);
const
LITRES_PER_CAR = 85;
var
rDiameter, rHeight, rLitres: Real;
iCars: Integer;
begin
rDiameter := StrToFloat(edtQ1_4_Diam.Text);
rHeight := StrToFloat(edtQ1_4_Height.Text);
rLitres := Pi * Sqr(rDiameter / 2) * rHeight * 1000;
iCars := Trunc(rLitres / LITRES_PER_CAR);
lblQ1_4_Vol.Caption := 'Water in tank: ' + IntToStr(Round(rLitres)) + ' litres';
lblQ1_4_Cars.Caption := 'Number of cars that can be washed: ' + IntToStr(iCars);
end;
// ===========================================================================
// Question 1.5 5 marks
// ===========================================================================
procedure TfrmQuestion1.btnQ1_5Click(Sender: TObject);
var
iNum1, iNum2, iNum3, iLargest: Integer;
begin
iNum1 := Random(9) + 1;
iNum2 := Random(9) + 1;
iNum3 := Random(9) + 1;
lblQ1_5_Nums.Caption := 'Numbers: ' + IntToStr(iNum1) + ' ' +
IntToStr(iNum2) + ' ' + IntToStr(iNum3);
if (iNum1 = iNum2) AND (iNum2 = iNum3) then
lblQ1_5_Result.Caption := 'Jackpot - FREE WASH!'
else
Copyright reserved Please turn over
Information Technology/P1 16 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
begin
if (iNum1 >= iNum2) AND (iNum1 >= iNum3) then
iLargest := iNum1
else if iNum2 >= iNum3 then
iLargest := iNum2
else
iLargest := iNum3;
lblQ1_5_Result.Caption := 'Largest number: ' + IntToStr(iLargest);
end;
end;
end.
Copyright reserved Please turn over
Information Technology/P1 17 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
ANNEXURE F: SOLUTION FOR QUESTION 2
// ===========================================================================
// Provided code
// ===========================================================================
procedure TfrmQuestion2.FormCreate(Sender: TObject);
begin
FormatSettings.DecimalSeparator := '.';
Randomize;
end;
// ===========================================================================
// Question 2.1 11 marks
// ===========================================================================
procedure TfrmQuestion2.btnQ2_1Click(Sender: TObject);
var
sID, sYear: String;
i, iYY, iGenderNum: Integer;
bValid: Boolean;
begin
memQ2_1.Clear;
sID := edtQ2_1.Text;
bValid := Length(sID) = 13;
for i := 1 to Length(sID) do
if NOT (sID[i] in ['0'..'9']) then
bValid := False;
if NOT bValid then
begin
ShowMessage('Invalid ID number');
Exit;
end;
iYY := StrToInt(Copy(sID, 1, 2));
if iYY <= 26 then
sYear := IntToStr(2000 + iYY)
else
sYear := IntToStr(1900 + iYY);
memQ2_1.Lines.Add('Date of birth: ' + Copy(sID, 5, 2) + '/' +
Copy(sID, 3, 2) + '/' + sYear);
iGenderNum := StrToInt(Copy(sID, 7, 4));
if iGenderNum < 5000 then
memQ2_1.Lines.Add('Gender: Female')
else
memQ2_1.Lines.Add('Gender: Male');
if sID[11] = '0' then
memQ2_1.Lines.Add('Citizenship: South African citizen')
else
memQ2_1.Lines.Add('Citizenship: Permanent resident');
end;
// ===========================================================================
// Question 2.2 8 marks
// ===========================================================================
procedure TfrmQuestion2.btnQ2_2Click(Sender: TObject);
var
sName, sSurname, sCode: String;
i, iSpace: Integer;
begin
sName := edtQ2_2.Text;
Copyright reserved Please turn over
Information Technology/P1 18 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
iSpace := Pos(' ', sName);
sSurname := UpperCase(Copy(sName, iSpace + 1, Length(sName) - iSpace));
sCode := UpperCase(sName[1]);
for i := 1 to Length(sSurname) do
if NOT (sSurname[i] in ['A', 'E', 'I', 'O', 'U']) then
sCode := sCode + sSurname[i];
sCode := sCode + Copy(edtQ2_1.Text, 1, 2) + '-' +
IntToStr(Random(900) + 100);
lblQ2_2.Caption := 'Membership code: ' + sCode;
end;
// ===========================================================================
// Question 2.3 11 marks
// ===========================================================================
procedure TfrmQuestion2.btnQ2_3Click(Sender: TObject);
var
sReview, sWord, sLongest, sLevel: String;
i, iWords, iLetters: Integer;
rAverage: Real;
begin
memQ2_3.Clear;
sReview := edtQ2_3.Text + ' ';
iWords := 0;
iLetters := 0;
sWord := '';
sLongest := '';
for i := 1 to Length(sReview) do
begin
if UpCase(sReview[i]) in ['A'..'Z'] then
begin
sWord := sWord + sReview[i];
Inc(iLetters);
end
else if sReview[i] = ' ' then
begin
if sWord <> '' then
begin
Inc(iWords);
if Length(sWord) > Length(sLongest) then
sLongest := sWord;
sWord := '';
end;
end;
end;
if iWords = 0 then
begin
ShowMessage('Enter a review');
Exit;
end;
rAverage := iLetters / iWords;
if rAverage < 4.5 then
sLevel := 'Easy'
else if rAverage < 6 then
sLevel := 'Moderate'
else
sLevel := 'Challenging';
memQ2_3.Lines.Add('Number of words: ' + IntToStr(iWords));
memQ2_3.Lines.Add('Number of letters: ' + IntToStr(iLetters));
Copyright reserved Please turn over
Information Technology/P1 19 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
memQ2_3.Lines.Add('Longest word: ' + sLongest + ' (' +
IntToStr(Length(sLongest)) + ' letters)');
memQ2_3.Lines.Add('Average word length: ' + FormatFloat('0.0', rAverage));
memQ2_3.Lines.Add('Reading level: ' + sLevel);
end;
end.
Copyright reserved Please turn over
Information Technology/P1 20 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
ANNEXURE G: SOLUTION FOR QUESTION 3
// ===========================================================================
// Provided code
// ===========================================================================
procedure TfrmQuestion3.FormCreate(Sender: TObject);
begin
FormatSettings.DecimalSeparator := '.';
Randomize;
end;
// ===========================================================================
// Question 3.1 7 marks
// ===========================================================================
procedure TfrmQuestion3.btnQ3_1Click(Sender: TObject);
var
iNumber, iDigit, iCount, iSum, iReverse: Integer;
begin
memQ3.Clear;
iNumber := StrToInt(edtQ3_1.Text);
iCount := 0;
iSum := 0;
iReverse := 0;
while iNumber > 0 do
begin
iDigit := iNumber MOD 10;
Inc(iCount);
iSum := iSum + iDigit;
iReverse := iReverse * 10 + iDigit;
iNumber := iNumber DIV 10;
end;
memQ3.Lines.Add('Number of digits: ' + IntToStr(iCount));
memQ3.Lines.Add('Sum of the digits: ' + IntToStr(iSum));
memQ3.Lines.Add('Reversed number: ' + IntToStr(iReverse));
end;
// ===========================================================================
// Question 3.2 8 marks
// ===========================================================================
procedure TfrmQuestion3.btnQ3_2Click(Sender: TObject);
var
iNumber, iFactor, iSum: Integer;
sFactors: String;
begin
memQ3.Clear;
iNumber := spnQ3_2.Value;
sFactors := '';
iSum := 0;
for iFactor := 1 to iNumber do
if iNumber MOD iFactor = 0 then
begin
sFactors := sFactors + IntToStr(iFactor) + ' ';
if iFactor < iNumber then
iSum := iSum + iFactor;
end;
memQ3.Lines.Add('Factors of ' + IntToStr(iNumber) + ': ' + sFactors);
memQ3.Lines.Add('Sum of the factors smaller than ' + IntToStr(iNumber) +
': ' + IntToStr(iSum));
Copyright reserved Please turn over
Information Technology/P1 21 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
if iSum = iNumber then
memQ3.Lines.Add(IntToStr(iNumber) + ' is a PERFECT number')
else if iSum > iNumber then
memQ3.Lines.Add(IntToStr(iNumber) + ' is an ABUNDANT number')
else
memQ3.Lines.Add(IntToStr(iNumber) + ' is a DEFICIENT number');
end;
// ===========================================================================
// Question 3.3 8 marks
// ===========================================================================
procedure TfrmQuestion3.btnQ3_3Click(Sender: TObject);
const
NUM_QUESTIONS = 5;
var
i, iNum1, iNum2, iAnswer, iCorrect: Integer;
sLine: String;
begin
memQ3.Clear;
iCorrect := 0;
for i := 1 to NUM_QUESTIONS do
begin
iNum1 := Random(11) + 2;
iNum2 := Random(11) + 2;
sLine := IntToStr(iNum1) + ' x ' + IntToStr(iNum2);
iAnswer := StrToInt(InputBox('Question ' + IntToStr(i), sLine + ' = ', ''));
if iAnswer = iNum1 * iNum2 then
begin
Inc(iCorrect);
memQ3.Lines.Add(IntToStr(i) + '. ' + sLine + ' = ' + IntToStr(iAnswer) +
' Correct');
end
else
memQ3.Lines.Add(IntToStr(i) + '. ' + sLine + ' = ' + IntToStr(iAnswer) +
' Wrong (' + IntToStr(iNum1 * iNum2) + ')');
end;
memQ3.Lines.Add('');
memQ3.Lines.Add('Score: ' + IntToStr(iCorrect) + ' out of ' +
IntToStr(NUM_QUESTIONS) + ' (' +
FormatFloat('0', iCorrect / NUM_QUESTIONS * 100) + '%)');
end;
// ===========================================================================
// Question 3.4 7 marks
// ===========================================================================
procedure TfrmQuestion3.btnQ3_4Click(Sender: TObject);
const
DROP = 8;
var
rPrice, rOriginal: Real;
iMonth: Integer;
begin
memQ3.Clear;
memQ3.Lines.Add('Month' + #9 + 'Value');
rOriginal := StrToFloat(edtQ3_4.Text);
rPrice := rOriginal;
for iMonth := 1 to spnQ3_4.Value do
begin
Copyright reserved Please turn over
Information Technology/P1 22 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
rPrice := rPrice - rPrice * DROP / 100;
memQ3.Lines.Add(IntToStr(iMonth) + #9 + FormatFloat('R 0.00', rPrice));
end;
memQ3.Lines.Add('');
memQ3.Lines.Add('Total drop in value: ' + FormatFloat('R 0.00', rOriginal - rPrice));
end;
end.
Copyright reserved Please turn over
Information Technology/P1 23 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
ANNEXURE H: SOLUTION FOR QUESTION 4
// ===========================================================================
// Provided code
// ===========================================================================
procedure TfrmQuestion4.FormCreate(Sender: TObject);
begin
FormatSettings.DecimalSeparator := '.';
Randomize;
end;
// ===========================================================================
// Question 4.1 10 marks
// ===========================================================================
procedure TfrmQuestion4.btnQ4_1Click(Sender: TObject);
const
FIRST_HOUR = 12;
HALF_HOUR = 6;
DAY_MAX = 90;
var
sIn, sOut: String;
iIn, iOut, iMinutes, iExtra, iBlocks: Integer;
rFee: Real;
begin
memQ4.Clear;
sIn := edtQ4_1_In.Text;
sOut := edtQ4_1_Out.Text;
iIn := StrToInt(Copy(sIn, 1, Pos(':', sIn) - 1)) * 60 +
StrToInt(Copy(sIn, Pos(':', sIn) + 1, 2));
iOut := StrToInt(Copy(sOut, 1, Pos(':', sOut) - 1)) * 60 +
StrToInt(Copy(sOut, Pos(':', sOut) + 1, 2));
if iOut <= iIn then
begin
ShowMessage('The exit time must be later than the entry time');
Exit;
end;
iMinutes := iOut - iIn;
if iMinutes <= 30 then
rFee := 0
else if iMinutes <= 60 then
rFee := FIRST_HOUR
else
begin
iExtra := iMinutes - 60;
iBlocks := iExtra DIV 30;
if iExtra MOD 30 > 0 then
Inc(iBlocks);
rFee := FIRST_HOUR + iBlocks * HALF_HOUR;
if rFee > DAY_MAX then
rFee := DAY_MAX;
end;
memQ4.Lines.Add('Time parked: ' + IntToStr(iMinutes DIV 60) + ' h ' +
IntToStr(iMinutes MOD 60) + ' min');
memQ4.Lines.Add('Parking fee: ' + FormatFloat('R 0.00', rFee));
end;
// ===========================================================================
// Question 4.2 7 marks
Copyright reserved Please turn over
Information Technology/P1 24 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
// ===========================================================================
procedure TfrmQuestion4.btnQ4_2Click(Sender: TObject);
var
sPlate: String;
cLetter: Char;
i: Integer;
begin
memQ4.Clear;
sPlate := '';
for i := 1 to 3 do
begin
repeat
cLetter := Chr(Random(26) + 65);
until NOT (cLetter in ['A', 'E', 'I', 'O', 'U']);
sPlate := sPlate + cLetter;
end;
sPlate := sPlate + ' ';
for i := 1 to 3 do
sPlate := sPlate + IntToStr(Random(10));
sPlate := sPlate + ' GP';
memQ4.Lines.Add('Number plate: ' + sPlate);
end;
// ===========================================================================
// Question 4.3 8 marks
// ===========================================================================
procedure TfrmQuestion4.btnQ4_3Click(Sender: TObject);
const
MAX_CARS = 200;
var
iCars, iHour, iTotal, iFewest, iQuietest: Integer;
begin
memQ4.Clear;
iHour := 0;
iTotal := 0;
iFewest := MAX_CARS + 1;
iQuietest := 0;
iCars := StrToInt(InputBox('Hourly cars', 'Cars in hour 1 (-1 to stop):', ''));
while iCars <> -1 do
begin
if (iCars < 0) OR (iCars > MAX_CARS) then
ShowMessage('Invalid number of cars')
else
begin
Inc(iHour);
iTotal := iTotal + iCars;
memQ4.Lines.Add('Hour ' + IntToStr(iHour) + ': ' + IntToStr(iCars) + ' cars');
if iCars < iFewest then
begin
iFewest := iCars;
iQuietest := iHour;
end;
end;
iCars := StrToInt(InputBox('Hourly cars', 'Cars in hour ' +
IntToStr(iHour + 1) + ' (-1 to stop):', ''));
end;
if iHour = 0 then
memQ4.Lines.Add('No data was entered')
Copyright reserved Please turn over
Information Technology/P1 25 Hlayiso/Mock 2026
Grade 10 – Marking Guidelines
else
begin
memQ4.Lines.Add('');
memQ4.Lines.Add('Total number of cars: ' + IntToStr(iTotal));
memQ4.Lines.Add('Quietest hour: Hour ' + IntToStr(iQuietest) + ' (' +
IntToStr(iFewest) + ' cars)');
memQ4.Lines.Add('Average per hour: ' + FormatFloat('0.0', iTotal / iHour));
end;
end;
end.
Copyright reserved
Study this subject
Recommended for this subject

Question paper
Information Technology Grade 10 P1 2018 QP

Question paper
Information Technology Grade 10 P1 2017 QP

Question paper and memo
Information Technology Grade 10 P1 2016 QP & Memo

Question paper and memo
Information Technology Grade 10 P1 KZN June 2015 QP & Memo

Annual teaching plan
Gr 10 Info Tech ATP 2023 24

Question paper
Information Technology Grade 10 April Test 2021 QP
More from Grade 10 Information Technology

Question paper
Information Technology Grade 10 P2 2018 QP

Question paper and memo
Information Technology Grade 10 NSC Prelim 2018 Paper & Memo

Question paper and memo
Information Technology Grade 10 2018 QP & Memo

Question paper and memo
Information Technology Grade 10 P2 2017 QP & Memo

Question paper and memo
Information Technology Grade 10 March Test 2017 Paper & Memo

Question paper and memo