# Information Technology Grade 11 P1 2020 Memo (Eng)

> Grade 11 Information Technology Paper 1 memorandum from the National Exemplar November Exam 2020 (English), 32 pages. Read online or download the free PDF.

- Page: https://www.hlayiso.com/library/grade-11-information-technology-2020-national-exemplar-november-exam-memorandum-paper-1-english/c150ec83-f0fe-45fc-bd9e-4ce7afb2cf41
- Updated: 2026-09-28
- Subject: Information Technology
- Grade: Grade 11
- Language: English
- Document type: Memorandum
- Year: 2020
- Exam period: National Exemplar November Exam
- Paper: 1
- Curriculum: CAPS
- Pages: 32

Breadcrumbs: [Home](https://www.hlayiso.com/) › [Library](https://www.hlayiso.com/library) › [Grade 11](https://www.hlayiso.com/library/grade-11) › [Information Technology](https://www.hlayiso.com/library/grade-11/information-technology) › [Information Technology Grade 11 P1 2020 Memo (Eng)](https://www.hlayiso.com/library/grade-11-information-technology-2020-national-exemplar-november-exam-memorandum-paper-1-english/c150ec83-f0fe-45fc-bd9e-4ce7afb2cf41)

## About this document

Information Technology · Grade 11 · National Exemplar November Exam · 2020 · English. Memorandum, 32 pages. Read online or download the PDF.

Read it free online on the page above; download the PDF from there.

## Matching paper and memo

- [IT P1 QP GR11 NOV2020 English D](https://www.hlayiso.com/library/grade-11-information-technology-2020-national-exemplar-november-exam-question-paper-paper-1-english/dc265938-825b-48dc-ba14-f71339195b39) — QP · 2020 · Eng

## Document text

Text extracted from the PDF. Layout, diagrams and tables may not survive extraction.

### Page 1

NATIONAL
                     SENIOR CERTIFICATE

                           GRADE 11

                      NOVEMBER 2020

           INFORMATION TECHNOLOGY P1

MARKS:   150

TIME:    3 hours

                               *IINFTE1*

                   This question paper consists of 15 pages.

### Page 2

2                             INFORMATION TECHNOLOGY P1                     (EC/NOVEMBER 2020)

 INSTRUCTIONS AND INFORMATION

 1.    This question paper consists of FOUR questions. Candidates must answer
       ALL four questions.
 2.    The duration of this examination is three hours. Because of the nature of
       this examination it is important to note that you will not be permitted to leave
       the examination room before the end of the examination session.
 3.    Answer only what is asked in each question. For example, if the question
       does not ask for data validation, then no marks will be awarded for data
       validation.
 4.    Your programs must be coded in such a way that they will work with any
       data and not just the sample data supplied or any data extracts that appear
       in this question paper.
 5.    Routines such as search, sort and selection must be developed from first
       principles. You may NOT use the built-in features of a programming
       language for any of these routines.
 6.    Save your work regularly. Ensure that all files can be read.
 7.    The files that you need to complete this question paper have been given to
       you. The files are provided in the form of password-protected executable
       files.
       Do the following:
       x Double click on the password-protected executable file.
       x Click on the ‘Extract’ button.
       x Enter the following password: Nov20C#4d
       Once extracted, the following list of files will be available in the folder
       DataNov2020:
       Question 1:                                   Question 3:
       Question1_u.pas                               Question3_u.pas
       Question1_u.dfm                               Question3_u.dfm
       Question1_p.dpr                               Question3_p.dpr
       Question1_p.res                               Question3_p.res
       SAFlag.txt                                    dbConnection_u.pas
                                                     CovidResearch.mdb
                                                     CovidResearchBackUp.mdb
       Question 2:                                   Question 4:
       Question2_u.pas                               Question4_u.pas
       Question2_u.dfm                               Question4_u.dfm
       Question2_p.dpr                               Question4_p.dpr
       Question2_p.res                               Question4_p.res
       numbers.txt

Copyright reserved                                                              Please turn over

### Page 3

(EC/NOVEMBER 2020)                   INFORMATION TECHNOLOGY P1                             3

 QUESTION 1: GENERAL PROGRAMMING SKILLS

 SCENARIO:

 Complete a program to create codes for patients when they are admitted to a
 hospital and display the total number of patients admitted to hospitals in the
 Eastern Cape and the Western Cape.

 Do the following:

     x    Open the incomplete program in the Question 1 folder.
     x    Enter your full name as a comment in the first line of the Question1_u.pas
          file.
     x    Compile and execute the program.          The program currently has no
          functionality.
     x    Follow the instructions to complete the code for each Question 1.1, 1.2 and
          1.3.

 1.1 Button [Q1.1 Get Patient Code] on Question 1.1 tabsheet

         Patients will enter their first name and surname into the edit box named
         edtfullname, choose a province (either Eastern Cape or Western Cape) from
         the combobox named cmbprovince and type in their year of birth (in the
         format ‘YYYY’) into the edit box named edtyear.

         Write code to do the following:

            x   An error message must be displayed and the procedure must exit if a
                patient did not choose a province.

                Example of output:

            x   Every time the Get Patient Code button is clicked, the number of
                patients for the selected province must be increased by one. The total
                number of patients for each province must be displayed on the panels
                named pnlEC and pnlWC.

Copyright reserved                                                           Please turn over

### Page 4

4                              INFORMATION TECHNOLOGY P1                     (EC/NOVEMBER 2020)

         Example of output:

     x   The patient code must be compiled and displayed in a message
         component using the following algorithm:

         The 1st character of the first name and the 1st character of the surname
         must be joined to the 3rd and 4th characters of the year of birth and the first
         four characters of the province. A random number from 1000 to 60 000
         (both included) must be added to the end of the code.

         Example: Vuyelwa Mcuba was born in 2001 and has been admitted to a
         hospital in the Eastern Cape. She will have a patient code of
         VM01East26099. (The random number is 26099).

         Example of output:

                                                                                           (26)

Copyright reserved                                                               Please turn over

### Page 5

(EC/NOVEMBER 2020)                INFORMATION TECHNOLOGY P1                              5

 1.2 Button [Q1.2 Encryption] on Question 1.2 tabsheet

       The user will enter a sentence in the edit box named edtinput which must
       then be encrypted and displayed in a label named lbldisplay.

       Write code to do the following:

       x The input from the edit component named edtinput must be converted to
         all capital letters and then the sentence must be encrypted and displayed
         in the label named lbldisplay using the following cypher:

          x A space is represented as the number 1.
          x The characters from A to Z are represented as numbers from 2 to 27.
          x All symbols and numbers in the original sentence are represented as
            the number 0.
          x A star (*) must be added to the beginning and end of the encrypted
            string.
          x Every number of the encrypted string must be separated by a star (*).

             Example of output if ‘Do IT’ is entered:

             Example of output if ‘Do IT 2#’ is entered:

                                                                                      (13)

Copyright reserved                                                         Please turn over

### Page 6

6                             INFORMATION TECHNOLOGY P1                     (EC/NOVEMBER 2020)

 1.3 The rgppicture onclick event:

       The user will choose an option from the radio group named rgppicture.

       Write code to do the following:

       If the user clicks on the radio button for ‘No background’, then the picture of
       the image component named imgdisplay must be set to invisible.

       If the user clicks on the ‘South African Flag’ radio button, then the picture
       named SAFlag.jpg must be displayed as the background and the picture in
       the image component must be set to visible.

       Example of output:

                                                                                          (7)

       x    Enter your name and surname as a comment in the first line of the
            program file.
       x    Save your program.
       x    A printout of the code may be required.                                      [46]

Copyright reserved                                                              Please turn over

### Page 7

(EC/NOVEMBER 2020)                      INFORMATION TECHNOLOGY P1                                            7

 QUESTION 2: ARRAYS AND TEXT FILES

 Do the following:

 x Compile and execute the program in the Question 2 folder. The program
   currently has limited functionality.
 x Enter your full name as a comment in the first line of the Question2_u.pas
   file.
 x Complete the code for each question as described in Question 2.

 2.1    Button [Q2.1 Display]

        A global array named arrqty has been declared which contains 10
        integers. The numbers in this array represent the total number of positive
        cases of the first 10 days of April.

        Another global array named arrdays has been declared which contains
        strings representing the first 10 days of April and this array is parallel to
        arrqty.

        Below is a diagrammatical representation of the array named arrqty:

             1         2        3       4        5        6        7         8         9       10
           1505 1934 1380 2003 1686 1655 1845 1462 1749 1585

        Below is a diagrammatical representation of the array named arrdays:

            1          2        3        4       5         6           7         8      9        10
                                1       10                                              7
          3 April    9 April                   6 April   5 April   8 April   2 April           4 April
                               April   April                                           April

        Write code to do the following:

        x Sort the array named arrqty (as well as the array named arrdays) in
          descending order from the highest value to the lowest value of the
          array named arrqty.

         x Display the contents of the two global arrays in the richedit named
           redout using neat spacing. (Code has been provided for headings and
           a tab stop.)

         x Calculate and display the average of all infections in the richedit,
           rounded to a whole number.

Copyright reserved                                                                             Please turn over

### Page 8

8                              INFORMATION TECHNOLOGY P1                    (EC/NOVEMBER 2020)

        Example of output:

                                                                                         (21)

 2.2    Button [Q2.2 Multiples]

        You are provided with the text file named numbers.txt which contains
        FIVE lines representing the following data:

        You are also provided with a constant array named arradd.

               CONST arradd : array [1..5] of integer = (8,6,4,2,0);

        You are going to calculate the multiples of 18 by using the diagram below:

                     Numbers from the text file:   1   3     5    7     9
                            Numbers to append:     8   6     4    2     0
                                Multiples of 18: 18    36   54   72    90

        Do the following:

        x Write code to display a message and exit the procedure if the text file
          does not exist.
        x Read the lines from the text file into an array and append the numbers
          8,6,4,2 and 0 using the constant array named arradd to each of the
          corresponding numbers 1,3,5,7 and 9 from the text file, as shown in the
          diagram above, using a looping structure.
        x Create a text file named ‘Multiples of 18.txt’.
        x Write to this text file, the five multiples of 18 (18,36,54,72,90) which you
          compiled using the method above. Use a looping structure.
        x Display a message indicating that the file was successfully written.

Copyright reserved                                                              Please turn over

### Page 9

(EC/NOVEMBER 2020)                 INFORMATION TECHNOLOGY P1                         9

        NOTE: If you do not use a loop, you will lose marks.

        Example of output to the text file:

                                                                                 (21)

        x   Enter your name and surname as a comment in the first line of the
            program file.
        x   Save your program.
        x   A printout of the code may be required.                              [42]

Copyright reserved                                                     Please turn over

### Page 10

10                           INFORMATION TECHNOLOGY P1                    (EC/NOVEMBER 2020)

 QUESTION 3: DATABASE MANIPULATION

 This question consists of sub-questions 3.1 to 3.5. The following important notes
 are applicable to all questions:

 x You are NOT allowed to modify or add to the supplied data or supplied
   programming code.
 x Good programming techniques from first principles only must be applied.
 x NO marks will be assigned for hardcoding. Use control structures and
   variables where necessary
 x Do NOT use filter, sort, locate, recordcount, etc.

 There are thousands of research articles based on the ‘Covid-19’ disease. A
 database has been designed to store details of a few of these research papers
 and they are recorded in one table.

 A table named Articles has been supplied in the database named
 CovidResearch.mdb.

 A sample of records in this table is displayed below:

 The design view of the table named Articles, which includes the field data types,
 is displayed below:

 NOTE:

 x Connection code to connect the database has been provided.
 x When the Restore Database button is clicked, the data in the database will
   be restored to the original data.
 x The name of the table to be used in your code, is tblResearch.

Copyright reserved                                                            Please turn over

### Page 11

(EC/NOVEMBER 2020)                INFORMATION TECHNOLOGY P1                                 11

 Do the following:

 x Compile and execute the program in the Question 3 folder. The program
   currently has limited functionality.
 x Enter your full name as a comment in the first line of the Question3_u.pas
   file.
 x Complete the code for each question as described in Question 3.

 3.1    Button [Q3.1 Display Pages]

        Display the Title of all articles which contain more than 100 Pages.
        Display the results in the richedit named reddisplay.

        Example of output:

                                                                                         (7)

 3.2    Button [Q3.2 Change to English]

        There exists more than one article which was written in English but the
        Language has been saved as ‘eng’ in the table. This was a result of
        errors when data entry occurred.

        You must write code to change the Language of those articles from ‘eng’
        to ‘English’.

        Example of output of the first few records:

                                                                                         (7)

Copyright reserved                                                             Please turn over

### Page 12

12                               INFORMATION TECHNOLOGY P1                (EC/NOVEMBER 2020)

 3.3    Button [Q3.3 Delete PMC articles]

        Write code to delete all articles with the Source field named ‘PMC’.

        Example of output:

                                                                                        (6)

 3.4    Button [Q3.4 Percentage of Chinese articles]

        Write code to calculate and display the percentage of Chinese articles
        that exist in the table.

        Display the total number of articles in the table as well as the percentage
        of Chinese articles in the richedit named reddisplay. Display the
        percentage of Chinese articles rounded to a whole number.

        Example of the display in redDisplay (after PMC articles are deleted
        (Q3.3)):

                     Total number of articles = 13
                     Percentage of Chinese articles = 23 percent
                                                                                       (13)

Copyright reserved                                                             Please turn over

### Page 13

(EC/NOVEMBER 2020)                 INFORMATION TECHNOLOGY P1                                 13

 3.5    Button [Q3.5 Add Article]

        Add a new article with the title, ‘Vaccine trials’. This article consists of 43
        pages and was written in English by the author ‘Watson M’ and published
        by ‘Cureus’.

        Example of output:

                                                                                          (7)

         x   Enter your name and surname as a comment in the first line of the
             program file.
         x   Save your program.
         x   A printout of the code may be required.                                      [40]

Copyright reserved                                                              Please turn over

### Page 14

14                           INFORMATION TECHNOLOGY P1                   (EC/NOVEMBER 2020)

 QUESTION 4: GENERAL PROBLEM SOLVING

 Do the following:

 x Compile and execute the program in the Question 4 folder. The program
   currently has limited functionality.
 x Enter your full name as a comment in the first line of the Question4_u.pas
   file.
 x Complete the code for each question as described in Question 4.

 Button [Q4 Request for Test]

 Write code to do the following:

 x Get the name and the age of a patient from the input components named
   edtname and sedage.

 x If the age of the person is greater than or equal to 60, then a string variable
   must consist of the following: ‘Your test is on ’ joined to the system date.

 Example of the compiled string if today’s date is 6 November 2020:
                          ‘Your test is on 2020/11/06’

 x If the age of the person is less than 60, then the string must be set to the
   following: ‘Your test is on ’ joined to the system date + 1 day.

 Example of the compiled string if today’s date is 6 November 2020:
                          ‘Your test is on 2020/11/07’

 x If the check box named chksymptoms is checked AND one of either
   chktravel or chkcontact is checked, then display the patient’s name and the
   date to be tested on two separate lines on the label named lbldisplay, else
   display the message ‘Phone your doctor if you are worried’ on the label
   named lbldisplay.

Copyright reserved                                                           Please turn over

### Page 15

(EC/NOVEMBER 2020)               INFORMATION TECHNOLOGY P1                               15

        Example of output for Question 4 if today’s date is 27 June 2020 and if the
        different checkboxes are selected:

        x   Enter your name and surname as a comment in the first line of the
            program file.
        x   Save your program.
        x   A printout of the code may be required.                                   [22]

                                                                          TOTAL:      150

Copyright reserved                                                          Please turn over

### Page 17

NATIONAL
                  SENIOR CERTIFICATE

                       GRADE 11

                   NOVEMBER 2020

           INFORMATION TECHNOLOGY P1
               MARKING GUIDELINE

MARKS:   150

               This marking guideline consists of 11 pages.

### Page 18

2                               INFORMATION TECHNOLOGY P1              (EC/NOVEMBER 2020)

 NAME OF LEARNER:
      TOTAL             TOTAL                 TOTAL             TOTAL
                                                                                  TOTAL
    QUESTION 1        QUESTION 2            QUESTION 3        QUESTION 4

              /46                  /42                  /40          /22                 /150
                                                                        MAX          MARKS
                                QUESTION 1                             MARKS        ACHIEVED

 1.1    Button [Q1.1 Get patient code]

        Get full name from edtfullname 9
        Get year from edtyob 9
        Get province from cmbprovince 9

        If itemindex of combobox = 0 9
            add 1 to counter for EC 9
        Else9
           if itemindex = 1 9
              add 1 to counter for WC 9
           Else9
              Showmessage 9 and exit 9

            Alternative no 1:
            Case structure 9
            Itemindex = 0 9 add 1 to counter for EC 9
            Itemindex = 1 9 add 1 to counter for WC 9                      26
            Else 9
            Showmessage 9 and exit 9

        Compile code:
        Get first name initial 9
        Get surname initial 9 using pos 9
        1st character of first name 9
        1st character of surname 9
        Characters 3 and 4 from year 9
        First 4 characters 9 from province 9
        Random number 9 in correct range 9
        (randomrange(1000,60001) using inttostr 9

        Showmessage component to display code 9
        pnlEC caption = counter for EC 9
        pnlWC caption = counter for WC 9
        using inttostr for both 9

Copyright reserved                                                         Please turn over

### Page 19

(EC/NOVEMBER 2020)                INFORMATION TECHNOLOGY P1                                     3

 1.2    Button [Q1.2 Encryption]

        get input from edtinput 9 and set to uppercase 9

        initialise new string to a star 9
        use a loop 9 from 1 to length of the input string 9
                                                                                 13
          get the correct encrypted number (using any method) 999 9
          add the character number to the new string 9and add a star 9

        display compiled 9 string in label lbldisplay 9

 1.3    The rgpbackground onclick event:

        If radiogroup box itemindex = 0 9
        then set imgbackground visible property 9 = false 9
                                                                                  7
        If radiogroup box itemindex = 1 9
        then set imgbackground picture to ‘SAFlag.jpg’ 9
          and 9 set imgbackground visible property = true 9

                                                          Question 1 Total       46

Copyright reserved                                                           Please turn over

### Page 20

4                                   INFORMATION TECHNOLOGY P1                                (EC/NOVEMBER 2020)

                                                                                               MAX         MARKS
                                     QUESTION 2
                                                                                              MARKS       ACHIEVED
    2.1   Button [Q2.1 Display]
          Sorting two arrays
          outer loop from 1 to 9 9
           Inner loop from outer loop counter + 1 to 10 9
              If arrqty[outer] < arrqty [inner] then 9
                        set temp = arrqty [outer] 9
                        set arrqty [outer] = arrqty [inner] 9
                        set arrqty [inner] = temp 9
                        do the same swap algorithm for arrdays 9
                        using string temp variable 9

          Display arrays
          loop from 1 to 10 9                                                                    21
             use richedit 9
             display contents of arrdays, 9 arrqty 9
             using tab stop 9 using inttostr for arrqty 9

          Calculate and display average
          initialise total variable 9
          loop from 1 to 10 9
             set total variable = total 9 + arrqty using loop index 9

          calculate average = total/10 9
          display average in richedit 9with a message rounded to a
          whole number 9
    2.2   Button [Q2.3 Multiples]

          If file does not exist then 9
                 Show message 9 exit 9
          Assignfile 9and reset text file 9     Alternative solution
          Set counter = 0                       for loop from 1 to 5 9
          Loop to end of text file 9            Read line 9 into an array 9
                                                using for loop counter 9
              Add 1 to counter (initialised) 9
              Read line 9Add to an array using counter 9
          (subtract 1 mark if the same text file variable is used to write to text file in
          next operation and the text file was not closed after reading)                         21
          Loop from 1 to counter (or 5) 9
              append number 9 from constant array 9using loop index
              to end of array using loop index 9
              and store into same array 9
          Assignfile with correct file name 9and Rewrite statement 9
          Loop from 1 to counter or 5 9
             Write content of array using loop index 9 to text file 9
          Closefile statement after loop 9
          Display a message that the file was written 9

                                                                     Question 2 Total            42

Copyright reserved                                                                            Please turn over

### Page 21

(EC/NOVEMBER 2020)                   INFORMATION TECHNOLOGY P1                                      5

                                                                            MAX        MARKS
                             QUESTION 3
                                                                           MARKS      ACHIEVED
  3.1     BUTTON: [Q3.1 Display Pages]
          Go to first record 9
          Loop to end of the table 9
            If Pages 9 > 100 9                                               7
              Then display Title 9 in richedit 9
           Go to next record before end of loop 9

  3.2     BUTTON: [Q3.2 Change to English]
          Go to first record 9
          Loop to end of the table 9
            If Language = ‘eng’ 9
               Then Edit 9                                                   7
                     Set Language = ‘English’ 9
                     Post 9
            Go to next record before end of loop 9

  3.3     BUTTON: [Q3.3 Delete PMC articles]
          Go to first record 9
          Loop to end of the table 9
            if Source = 'PMC' then 9
                                                                             6
                 Delete 9
                else 9
           Go to next record before end of loop 9

  3.4     BUTTON: [Q3.4 Percentage of Chinese articles]
          Set counter to 0 9 and total to 0 9
          Go to first record 9
          Loop to end of the table 9
             If Language = ‘Chinese’ 9 Then Add 1 to counter 9
           Add 1 to total variable 9
                                                                            13
           Go to next record before end of loop 9
          Display in richedit 9
            Total of all articles converted to string 9
             Percentage calculated correctly 9 and converted to
             string 9with no decimal places 9

  3.5     BUTTON: [Q3.5 Insert Article]

          tblresearch.Insert; 9
          tblresearch['Title'] := ‘Vaccine trials’; 9
          tblresearch['Author'] := ‘Watson M’; 9
                                                                             7
          tblresearch['Publisher'] := ‘Cureus’; 9
          tblresearch['Pages'] := 43;9
          tblresearch['Language'] := ‘English’; 9
          tblresearch.Post; 9

                                                        Question 3 Total    40

Copyright reserved                                                               Please turn over

### Page 22

6                             INFORMATION TECHNOLOGY P1                 (EC/NOVEMBER 2020)

                                                                       MAX      MARKS
                            QUESTION 4
                                                                      MARKS    ACHIEVED

    Button [Q4 Request for test]

    Get full name 9and age 9 from input components
    Get system date 9

    If age >= 60 9then
          string = ‘your test date is on’ 9
          joined to system date converted to string 9
    Else 9
       string = ‘your test date is on’ 9                               22
        joined to system date 9 + 1 day 9
         converted to string 9

    if chksymptoms.Checked 9 and 9
               (chktravel.Checked 9or 9chkcontact.Checked 9)
     then
         lbldisplay.Caption 9 = name 9+ #13 9 + compiled string 9
     else9
     lbldisplay.Caption = 'Phone your doctor if you are worried'; 9

                                                   Question 4 Total    22

Copyright reserved                                                       Please turn over

### Page 23

(EC/NOVEMBER 2020)               INFORMATION TECHNOLOGY P1                         7

SAMPLE SOLUTIONS

QUESTION 1
procedure TQuestion1.btnQ1_1Click(Sender: TObject);
var
 sfull, sfirst, ssur, scode : string;
 sdate, sprov : string;
begin
// enter your code here
 case cmbprovince.itemindex of
  0 : inc(inumec);
  1 : inc(inumwc)
  else
  begin
  showmessage('Please choose a province');
  exit;
  end;
 end;
 sfull := edtfullname.Text;
 sfirst := sfull[1];
 delete(sfull,1,pos(' ',sfull));
 ssur := sfull[1];
 sdate := edtyob.text;
 sprov := cmbprovince.Text;
 scode := sfirst + ssur + copy(sdate,3,2) + copy(sprov,1,4) +
inttostr(randomrange(1000,60001));

showmessage('Your patient code is ' + scode);
pnlec.Caption := inttostr(inumec);
pnlwc.Caption := inttostr(inumwc);
end;

procedure TQuestion1.btnQ1_2Click(Sender: TObject);
var k, ipos : integer;
snew, SSENT : string;
const
salpha = ' ABCDEFGHIJKLMNOPQRSTUVWXYZ';
begin
// enter your code here
 ssent := uppercase(edtinput.Text);
 snew := '*';
 for k := 1 to length(ssent) do
    begin
     ipos := pos(ssent[k],salpha);
     snew := snew + inttostr(ipos) + '*';
    end;
 lbldisplay.Caption := snew;
end;

Copyright reserved                                              Please turn over

### Page 24

8                                INFORMATION TECHNOLOGY P1                    (EC/NOVEMBER 2020)

procedure TQuestion1.rgbpictureClick(Sender: TObject);
begin
// enter your code here
case rgbpicture.itemindex of
 0 : imgdisplay.Visible := false;
 1 : begin
     imgdisplay.Visible := true;
     imgdisplay.Picture.LoadFromFile('SAFlag.jpg');
    end;

 end;
end;

QUESTION 2
procedure TfrmQuestion2.btnQ2_1Click(Sender: TObject);
var k, l, itemp, inum, icount, itotal : integer;
stemp, snum : string;
rpercent : real;
bfound : boolean;
begin
// provided code do not delete////////
redout.Paragraph.TabCount := 1;
redout.Paragraph.tab[0] := 40;
redout.Lines.Add('Date' + #9 + 'Cases');
for k := 1 to 9 do
    for l := k + 1 to 10 do
      begin
        if arrqty[k] < arrqty[l] then
           begin
            itemp := arrqty[k];
            arrqty[k] := arrqty[l];
            arrqty[l] := itemp;

             stemp := arrdays[k];
            arrdays[k] := arrdays[l];
             arrdays[l] := stemp;
          end;
      end;
itotal := 0;
for k := 1 to 10 do
 itotal := itotal + arrqty[k];

for k := 1 to 10 do
 redout.Lines.Add(arrdays[k] + #9 + inttostr(arrqty[k]));

redout.Lines.Add('');
redout.Lines.Add('Average number of infections = ' + floattostrf(itotal/10,fffixed,8,0));

end;

Copyright reserved                                                             Please turn over

### Page 25

(EC/NOVEMBER 2020)                    INFORMATION TECHNOLOGY P1                      9

procedure TfrmQuestion2.btnQ2_2Click(Sender: TObject);
// provided code do not delete///////
const
arradd : array [1..5] of integer = (8,6,4,2,0);
///////////////////////////////////////////////
var myfile, tfile : textfile;
sline : string;
k : integer;
arrnumbers : array[1..6] of string;
icount : integer;
begin
if not fileexists('numbers.txt') then
begin
  showmessage('file not found');
  exit;
end;
assignfile(myfile,'numbers.txt');
reset(myfile);
icount := 0;
while not eof(myfile) do
   begin
   inc(icount);
   readln(myfile,sline);
   arrnumbers[icount]:= sline;
  end;
//closefile(myfile);

for k := 1 to icount do
   begin
    arrnumbers[k] := arrnumbers[k]
              + inttostr(arradd[k]);
    end;

assignfile(tfile,'Multiples of 18.txt');
rewrite(tfile);
for k := 1 to 5 do
  writeln(tfile, arrnumbers[k]);

closefile(tfile);
end;

Copyright reserved                                                Please turn over

### Page 26

10                             INFORMATION TECHNOLOGY P1   (EC/NOVEMBER 2020)

QUESTION 3

procedure TfrmQuestion3.btnQ3_1Click(Sender: TObject);
begin
reddisplay.Clear;
tblresearch.First;
while not tblresearch.eof do
   begin
     if tblresearch['Pages'] > 100 then
          reddisplay.Lines.Add(tblresearch['Title']);
     tblresearch.Next;
   end;
end;

procedure TfrmQuestion3.btnQ3_2Click(Sender: TObject);
begin
tblresearch.First;
while not tblresearch.eof do
   begin
     if tblresearch['Language'] = 'eng' then
         begin
          tblresearch.Edit;
          tblresearch['Language'] := 'English';
          tblresearch.Post;
         end;
     tblresearch.Next;
   end;
end;

procedure TfrmQuestion3.btnQ3_3Click(Sender: TObject);
begin
tblresearch.First;
while not tblresearch.eof do
   begin
     if tblresearch['Source'] = 'PMC' then
        tblresearch.Delete
       else
     tblresearch.Next;
   end;
end;

procedure TfrmQuestion3.btnQ3_4Click(Sender: TObject);
var inum , itotal : integer;
begin
  inum := 0;
  itotal := 0;
reddisplay.Clear;
tblresearch.First;

while not tblresearch.eof do
  begin

Copyright reserved                                          Please turn over

### Page 27

(EC/NOVEMBER 2020)                 INFORMATION TECHNOLOGY P1                               11

    if tblresearch['Language'] = 'Chinese' then
         inc(inum);
    inc(itotal);
   tblresearch.next;
   end;
reddisplay.Lines.Add('Total number of articles = ' + inttostr(itotal));
reddisplay.Lines.Add('Percentage of Chinese articles = ' + floattostrf(inum/itotal
*100,fffixed,8,0) + ' percent');
end;

procedure TfrmQuestion3.btnQ3_5Click(Sender: TObject);
begin
 tblresearch.insert;
 tblresearch['Title'] := 'Vaccine trials';
 tblresearch['Author'] := 'Watson M';
 tblresearch['Publisher'] := 'Cureus';
 tblresearch['Pages'] := '43';
 tblresearch['Language'] := 'English';
 tblresearch.Post;
end;

QUESTION 4

procedure TfrmQuestion4.btnQ4Click(Sender: TObject);
var sname : string;
 iage : integer;
stestdate : string;
begin
// enter your code here//
sname := edtname.Text;
iage := sedage.Value;

if iage >= 60 then
 stestdate := 'Your test is on ' + datetostr(date)
else
 stestdate := 'Your test is on ' + datetostr(date + 1);

if cbxsymptoms.Checked and (cbxtravel.Checked or cbxcontact.Checked) then
 lbldisplay.Caption := sname + #13 + stestdate
else
 lbldisplay.Caption := 'Phone your doctor if you are worried';

Showmessage('File has been written');
end;

Copyright reserved                                                           Please turn over

## Related documents

- [IT P2 GR11 MEMO NOV2020 ENG D](https://www.hlayiso.com/library/grade-11-information-technology-2020-national-exemplar-november-exam-memorandum-paper-2-english/788cd297-3bbb-4665-91fb-fd5121d74c91) — Information Technology · Memo · 2020 · Eng
- [IT-P2-GR11 QP MEMO NOV2020 ENG D](https://www.hlayiso.com/library/grade-11-information-technology-2020-national-exemplar-november-exam-memorandum-paper-2-english/9830133e-4040-4a2c-b4ac-49258d12b3b2) — Information Technology · Memo · 2020 · Eng
- [IT-P2-GR11 QP-Eng-NOV-2020](https://www.hlayiso.com/library/grade-11-information-technology-2020-national-exemplar-november-exam-question-paper-paper-2-english/6c71c346-5df7-4154-a75a-1e72787fed78) — Information Technology · QP · 2020 · Eng
- [IT P1 QP GR11 NOV2020 English D](https://www.hlayiso.com/library/it-p1-qp-gr11-nov2020-english-d/7b2666c6-ba4e-471a-b82d-0e9cc054a7f3) — Information Technology · QP · 2020 · Eng
- [IT P1 QP GR11 NOV2020 English](https://www.hlayiso.com/library/it-p1-qp-gr11-nov2020-english/f76e86f9-8bcb-424c-afaf-00ec85aa21a0) — Information Technology · QP · 2020 · Eng
- [IT P2 GR11 MEMO 2020 Afr](https://www.hlayiso.com/library/grade-11-information-technology-2020-national-exemplar-november-exam-memorandum-paper-2/42eca0ae-ea7c-48c5-a65e-33a549c78978) — Information Technology · Memo · 2020 · Afr

## More from Grade 11 Information Technology

- [Gr 11 Info Tech ATP 2023-24](https://www.hlayiso.com/library/gr-11-info-tech-atp-2023-24/67fc595c-646e-4c38-9951-fe5fe3a113a7) — ATP
- [IT P1 QP GR11 NOV 2022 AFR](https://www.hlayiso.com/library/it-p1-qp-gr11-nov-2022-afr/e4251ebe-2f65-4c6f-992b-f7208b36300a) — QP · 2022 · Afr
- [IT P1 QP GR11 NOV 2022 English](https://www.hlayiso.com/library/it-p1-qp-gr11-nov-2022-english/3db564bd-1d04-48ab-aedd-fae2d9f9939f) — QP · 2022 · Eng
- [IT P2 GR11 QP NOV2022 English](https://www.hlayiso.com/library/it-p2-gr11-qp-nov2022-english/1c12dccc-2a5b-4b41-a80c-5bd8b30f6151) — QP · 2022 · Eng
- [IT P1 QP GR11 NOV 2022 English](https://www.hlayiso.com/library/grade-11-information-technology-2022-exemplar-november-exam-question-paper-paper-1-english/c2d16637-c6bc-43d6-b469-cb62712d9eb0) — QP · 2022 · Eng
- [IT P2 GR11 QP NOV2022 English](https://www.hlayiso.com/library/grade-11-information-technology-2022-exemplar-november-exam-question-paper-paper-2-english/b3f6c643-27fc-4fd5-baa3-b8c49c4b6f61) — QP · 2022 · Eng

## Collection

- [Grade 11 past papers](https://www.hlayiso.com/grade-11/past-papers)

---

Hlayiso: free CAPS and IEB past papers, memos, notes and study guides for South African learners. When citing, link the page URL above, not a PDF or /api/ URL.
