admin@kcseforecast.com

+2541026301456

Q&A-KCSE Computer Studies Paper 1

Describe the role of the one-dimensional array in programming

  • holds an indexed sequence of variables of the same data type
  • Arrays can be used to store values of the same data type and the array is then used as a singular variable to increase efficiency

List three types of errors that are likely to exist in a program                             (3 marks)

Syntax errors-Incorrect use of programming language

Logical errors- The program do not give the expected output

Runtime errors- Premature end of a program

Computer programs require translation to execute. (a) Compilers and interpreters translate high-level programming languages into machine code. Describe the main differences between a compiler and an interpreter.

  • A compiler translates the whole program in one go whereas An interpreter translates each line of code (often an intermediate code) at run time
  • A compiler produces an executable file that will run on the target hardware machine without the compiler being installed  A run time interpreter will be required at run time
  • Compilers tend to be large complex programs Interpreters are smaller simpler programs
  • Interpreted programs can be amended and run without translating whole program Compiled programs have to be re-compiled after a change
  • Compilers compile programs that will usually only run on the target platform (hardware/operating system)  Interpreters will interpret same program (or intermediate code) on different (some virtual) platforms

One facility of a Software Development Environment is to convert source code to machine code.  Name and briefly describe four other facilities commonly found in a Software Development Environment.

  • Editor: this allows a programmer to enter and edit source code
  • Automatic formatting:  Correctly indents code
  • Automatic colour coding:  Changes key words, literals and annotation to different colours
  • Linker: this is a program which allows previously compiled code, from software libraries, to be linked together
  • Loader: this is a program which loads previously compiled code into memory.
  • Debugger: this is a program which helps locate, identify and rectify errors in a program
  • Syntax error detection:  Highlighting syntax errors before code is translated
  • Trace: this is a facility which displays the order in which the lines of a program are executed, and possibly the values of variables as the program is being run
  • Break point: this is a facility which interrupts a program on a specific line of code, allowing the programmer to compare the values of variables against expected values.  The program code can then usually be executed one line at a time.  This is called single-stepping
  • Variable watch: this is a facility which displays the current value of any variable.  The value can be 'watched' as the program code is single-stepped to see the effects of the code on the variable.  Alternatively a variable watch may be set, which will interrupt the program flow if the watched variable reaches a specified value
  • Memory inspector: this is a facility which will display the contents of a section of memory
  • Error diagnostics: these are used when a program fails to compile or to run.  Error messages are displayed to help the programmer diagnose what has gone wrong
  • Emulator: will provide and emulator to run the code/app so no physical device required
  • Context sensitive menu:  SDE suggests available options
  • Statement completion:  SDE will complete a statement such as adding an ‘end if’ to an ‘if’ statement GUI creation:  Allows programmer to create a GUI by dragging and dropping controls (buttons, etc...) onto a form.
  • Publisher: facility to package up and deploy program as an easy to install package

6 Programmers write software that controls hardware and interacts with users. Some of this software ensures that networks function properly.

(a) Compilers and interpreters translate source code written in programming languages.
  State four other features of a compiler.

 A single executable file is produced 

The executable program is portable between machines

The program source code is not available

Code can be optimised/made more efficient 

Entire source code file is converted at once

No special environment is needed to execute the code 

It creates object/machine code

Error report is provided at the end of the compilation

There are many different types of errors that can occur when developing computer programs. (a) State the name of the two different types of programming error described below.

(i) Unexpectedly halts the program. [1]  ..............................................................................................

(ii) The program produces the wrong output. [1]  ..............................................................................................
 (b) Another error can result from incorrectly using the rules or grammar of the programming language.

(i) Name this error.  .............................................................................................. [1]

(ii) State when this error is detected.

 

(i) Unexpectedly halts the program. Run time (execution)

(ii) The program produces the wrong output.  Logical
 (b) Another error can result from incorrectly using the rules or grammar of the programming language.

(i) Name this error. Syntax

(ii) State when this error is detected.

Syntax error is detected during translation into executable code / attempted to run but fails

Identify two advantages to a programmer of using a high-level language instead of a low-level language.

  • it is easier / quicker to read/write/understand
  • it is easier / quicker to debug
  • code is portable.

 

Suggest one disadvantage to the programmer of using a high-level language instead of a low-level language.

  • not able to directly manipulate the hardware
  • may need to wait for translation before running
  • the program may be less efficient.

 

Describe each of the following types of a program errors, giving an example in each case.

(i) Syntax error.
(ii) Logic error.
(iii) Arithmetic error/runtime error

(i) Incorrect use of language, e.g. PLINT instead of PRINT
(ii) A mistake in the structure of the solution, e.g. a jump goes to the wrong line
(iii) Inappropriate arithmetic is used, e.g. division by 0 is attempted

Explain what is meant by a LIFO data structure.

  • Data enters at one end (of a stack)
  • Leaves at the same end
  • Hence 'last in, first out'

Computer Studies Paper 1  KCSE 2021 Prediction

                                                    Section A

1.State two reasons for the increased use of laptop computers in government offices. [2]

They are small and fit in a small storage space

They are light weight hence can be carried to areas where their services are required

The monitor, system unit, keyboard units are integrated together

Easy to share

Have rechargeable battery

Have low power consumption

2.Computer network technicians prefer to use command-line based operating systems when configuring networks. State three reasons for the preference. [3]

Do not take up a lot of memory

Have direct access to most hardware devices/provide complete control during configuration

Cheaper to acquire as some are freeware/shareware

Faster to execute commands

Difficult to hack/more secure

More stable

3.State three measures that should be put in place in a computer laboratory to safeguard users’ health. [3]

 

  • All power cables must be insulated and hidden from users
  • Furniture used must be of standard
  • Room should have adequate lighting
  • No overcrowding
  • Monitor should be fitted with anti glare
  • Avoid dust
  • Avoid slippery floor
  • Avoid bright coloured walls
  • Promote use of ergonomic devices

 

4.State three ways in which barcode readers may be used in schools. [3]

Take inventory of items

Transactions in the school library

Keep track of movement of goods

Track students in and out of school

Used to register roll call

5.State three advantages of flat panel monitors over cathode ray tube monitors as used in computers.                                                                                                                     [3]

  • Compact and light/portable/less bulky/occupy less space
  • Consume less power
  • Low angle distortion
  • Improved color depth
  • Higher resolution
  • Have less radiation
  • Produce less heat

 

6.State three possible reasons for the extinction of daisy wheel printers in the market. [3]

  • Slow
  • Noisy
  • Lack of graphic support
  • Monochrome printer
  • Supported on font type and size

 

 

7.State three ways in which an operating system secures a computer system.             [3]

  • User authentication
  • Secure user accounts with privileges
  • Encryption of data
  • Keeping log files
  • Auto backup and auto recovery features
  • Inbuilt antivirus

 

8.A law firm prefers to use hard copy output when handling documents for legal matters. State two reasons for this preference.                                                            [2]

  • Can be used without electricity
  • Can serve as physical evidence/exhibit
  • Not easy to change content without leaving evidence
  • No need of computer knowledge

9.State the function of each of the following feature in a word processor

a. Thesaurus                                                                                                                    [1]

Feature that suggests words with similar or opposite meanings to the selected word

b. Comments                                                                                                                   [1]

Feature that allows a user to attach remarks

10. With the aid of an example, explain the term multi-level list as used in word processing.                                                                                                                [3]

  1. Chapter 10
    1. Summary
      1. xxxxxxxx

Formatting style that shows listed items at different level instead of using one line

11. Distinguish between real-time operating system and distributed operating system. [3]

Accept answers based on data processing concept

12. Explain the function of protect sheet feature in a spreadsheet program.                   [2]

A tool/feature that prevents unwanted changes to the spreadsheet. Requires a user to key in a password inorder to make changes

13. State four computer based careers introduced as a result of computerized data processing method at the airport.                                                                                     [2]

  • System analysts
  • Web designers
  • Network administrators
  • Network technicians
  • Programmers
  • Database Administrators

NB/ Accept any computer based career

14. In a spreadsheet, the formula = If(A1>10,A1*77,A1*50) is entered in a cell. Interpret the results.                                                                                                                        [3]

Checks the value in cell A1if it is more than 10, if the comparison is true then the outcome of the value in cell multiplied by 77 is displayed, else if it is false the results of the value in cell A1 multiplied by 50 are displayed.

15. State a stage in systems development cycle where each of the following activities are carried out:

a. Identifying the technologies that may be used in a proposed system.                       [1]

Accept any sub stage within system analysis e.g. requirement specification, problem definition, information gathering, etc

b. Identifying shortcomings of a system.                                                                       [1]

All stages of system development

 

c. Preparing the system migration plan.                                                                          [1]

 

Implementation stage

KCSE 2021 Computer Studies Paper Prediction 1                SECTION B

Answer question 16 and any other three questions from this section in the spaces provided.

16. a) With the aid of a flow chart, describe a loop control structure as used in programming. [4]  

A control structure that allows statement(s) to be repeatedly executed until a certain condition is met                                                                                                      2mks

NB. Accept any other looping construct

KCSE 2021 Prediction Computer Studies Paper 1

b) Study the following pseudocode and answer the questions that follow.

1. Start

2. Get Value1 and Value2

3. If Value1> Value2 Then

4. Maximum = Value1

5. Else If Value1< Value2 Then

6. Maximum = Value2

7. Else Go to 9

8. Display Maximum

9. Stop

i) State the purpose of the pseudocode                                                                                  [1]

To compare two values and output the greater of the two

ii) Draw a flowchart equivalent to the pseudocode.                                                                     [8]

KCSE 2021  Prediction Computer Studies Paper 1  Q.16 (c)

c) Distinguish between a source program and a compiler as used in computer programming. [2]

Source program is the original program in a high level language as written by the programmer while a compiler is a program translator that converts source program to object code.

Computer Studies Paper 1 2021  KCSE Prediction Section B Qs. 17,18 and 19

17. a) i) Explain the term search as used in the Internet.                                            [2]

A web based application that locates items or information from the World Wide Web

ii) Peter intends to download a movie from the Internet. State the three factors that may determine the total time taken to complete the download.                                           [3]

  • Size of the video/format
  • The bandwidth of the media/speed of network/network traffic
  • Type of browser software
  • Background activities running in the computer
  • Restrictions enforced in the computer/firewall/antivirus
  • Speed of the computer/CPU speed
  • Size of RAM

b) Wakulima online is an organization that runs a web based system for assisting farmers to obtain market for their produce. State four technological reasons that may cause a farmer not to access the organization’s system.                                                                                  [4]

  • Poor network/lack of connection
  • Software failure in the system
  • Hardware failure
  • Lack of access rights
  • System overload/hanging
  • Lack of skills/disability/illiteracy
  • Lack of power supply

c) Explain a situation when each of the following Desktop Publishing program features may be used when creating a publication:

i. Cropping                                                                                                               [2]

Applies to graphics – used to trim/remove/hide some portions in the graphics

ii. Transparency                                                                                                         [2]

Used to make background of a graphic to be clear/visible

d. List two areas where infrared waves are used in data communication.                             [2]

18. a) List four activities of the planning stage of systems development.                             Ignore this question, marks redistributed elsewhere

b) Explain a circumstance when each of the following feasibility studies are carried out during systems development.

i. Technical                                                                                                               [3]

Done to determine whether technology exists to support the proposed solution

 

ii. Economic                                                                                                              [3]

Done to determine whether the proposed solution is economically viable

 

iii. Schedule                                                                                                               [3]

Done to determine whether the proposed system can be done within an acceptable time.

c) Table 1 and Table 2 are related tables in a database. Use them to answer the questions that follow.

Table 1

Dept Code

Dept Name

001

Computer

002

Aviation

003

Engineering

 

Table 2

DeptID

Student Registration No.

Student’s Name

002

St01

Alex Too

003

St02

Naomi Komi

002

St03

Peter Kengo

 

i. Identify the appropriate primary key for each table.                    [2]

Table 1 – Dept code, Student Registration No

ii. Explain two benefits of enforcing referential integrity in the database. [4]

  • No record can be added in Table 2 if its corresponding record in Table 1 does not exist
  • No record in Table 1 can be deleted without first deleting the corresponding record in Table 2
  • Reduces data redundancies/ensures integrity
  • Prevents deletion of related table

19. a) Describe each of the following validation checks as used in data processing.

i. Preserve check                                                                                                      [2]

Ignore this question, marks redistributed elsewhere

ii. Data type check                                                                                                    [2]

Ensure correct type of data is entered for the field

iii. Check digit                                                                                                           [2]

This is a number added/calculated by the computer to a binary number. The check digit ensures correct transmission of the binary number.

b. Write each of the following abbreviations in full:

i) BCD                                                                                                                                    [1½]

Binary Coded Decimal

ii) EBCD                                                                                                                                 [

This question was thrown out and marks redistributed elsewhere

iii) ASCII                                                                                                                    [1½]

American Standard Code for Information Interchange

c) Using 10-bits binary number system, perform the following decimal operation using two’s complement.                                                                                                                                   [6]

12910 - 12810

+129 = 00 1000 0001

128 = 00 1000 0000

-128 = 11 0111 1111 (ones complement)

                            +1

          11 1000 0000 (Twos complement)

129- 128

     00 1000 0001

+ 11 1000 0000

 100 0000 0001

Hence = 00 0000 00012 or 12 (the overflow bit is ignored)