ATIKA SCHOOL
  • Home
    • JOBS IN KENYA AND ABROAD FOR KENYANS AND BEYOND
    • How its Done
    • KNEC Portal
    • Atika School Advanced Search
    • News and Opinions
    • Academic Environment
    • KNEC KCSE PROJECT INSTRUCTIONS
    • SITEMAP
    • About Us? >
      • About Us
      • Learn more about us
  • OUR PRODUCTS
    • All Categories >
      • Category
      • FREE NOVELS >
        • COURSE BOOKS
        • KCSE KISWAHILI SETBOOKS
        • Backed Up Files and Archives
        • FREE DOCUMENTS
        • PRIMARY 8-4-4 BASED RESOURCES
        • STANDARD 8 RESOURCES
        • HIGH SCHOOL RESOURCES >
          • Biology Paper 3 Exams
          • Secondary Examinations
        • PRIMARY CBC BASED RESOURCES
        • COLLEGE & VARSITY RESOURCES
    • PRIMARY RESOURCES CBC
    • PRIMARY RESOURCES 8-4-4
    • SECONDARY RESOURCES
    • NOTES & TUTORIALS
    • COLLEGE RESOURCES
    • NOVELS and OTHER BOOKS
  • EXAMINATIONS
    • PRIMARY EXAMS >
      • Primary Assignments and Random Exams
      • CBC
      • 8-4-4
      • STANDARD 8 PAST PAPERS 8-4-4 BASED
    • MOCKS AND JOINT EXAMS >
      • FORM 1 QUESTION PAPERS, ANSWERS AND MARKING SCHEMES COLLECTIONS
      • FORM 2 QUESTION PAPERS, ANSWERS AND MARKING SCHEMES COLLECTIONS
      • FORM 3 EXAMINATIONS, QUESTION PAPERS AND ANSWERS
      • MOCKS PAST EXAMS BY REGION
    • KCPE >
      • KCPE BY YEAR >
        • KCPE 2020 RESULTS, REPORTS, QUESTIONS AND ANSWERS
        • KCPE PAST PAPERS 2019 REPORTS, RESULTS, QUESTIONS AND ANSWERS
      • KCPE PAST PAPERS PER SUBJECT
      • KCPE PAST PAPERS AND ANSWERS
      • KCPE MATHEMATICS TOPICAL QUESTIONS FROM 1989 TO LAST YEAR
    • KCSE >
      • KCSE BY YEAR >
        • KNEC KCSE PAST PAPERS, MARKING SCHEMES, QUESTIONS & ANSWERS
      • KCSE BY SUBJECT >
        • KCSE PAST PAPERS BY SUBJECT
        • Free KCSE Past Papers Mathematics
        • Free KCSE Biology Questions and Answers
    • QUESTIONS & ANSWERS >
      • SECONDARY >
        • LANGUAGES >
          • A DOLL'S HOUSE BY HENRIK IBSEN RESOURCES
        • TECHNICALS >
          • COMPUTER STUDIES >
            • COMPUTER STUDIES Q & A
            • kcse computer studies paper 2 AND 3 Questions & Answers
          • BUSINESS STUDIES QUESTIONS & ANSWERS
          • KCSE AGRICULTURE TOPICAL QUESTIONS AND ANSWERS
          • KCSE HOME SCIENCE DIRECT QUESTIONS AND ANSWERS
        • SCIENCES >
          • KCSE Mathematics Topical Questions
          • KCSE Biology Topical Questions and Answers
          • CHEMISTRY TOPICAL QUESTIONS AND ANSWERS
          • KCSE Physics Topical Questions
          • KCSE physics Practical Sample Quiz
        • HUMANITIES >
          • ISLAMIC RELIGIOUS EDUCATION (IRE) QUESTIONS AND ANSWERS
          • KCSE History Topical Questions and Answers
          • GEOGRAPHY TOPICAL QUESTIONS AND ANSWERS
      • PRIMARY >
        • Standard 4-8 Mathematics Topical Questions from Mocks and KCPE
        • Std 6 Mathematics Notes
  • TUTORIALS
    • SECONDARY >
      • SCIENCES >
        • FOCUS MATHEMATICS TUTORIALS AND EXAMS FREE
        • KCSE BIOLOGY NOTES
        • FREE KCSE CHEMISTRY NOTES
        • KCSE PHYSICS NOTES, AUDIOVISUALS AND MORE
      • LANGUAGES >
        • ENGLISH >
          • English KCSE Set Books
          • ENGLISH POETRY QUESTIONS WITH ANSWERS FOR K.C.S.E CANDIDATES
          • ENGLISH GRAMMAR #KCSE
        • CHOZI LA HERI - MWONGOZO
        • KIGOGO - MWONGOZO
        • USHAIRI MASWALI NA MAJIBU
        • MASWALI NA MAJIBU YA TUMBO LISILOSHIBA
        • KCSE Kiswahili Fasihi
      • TECHNICALS >
        • HOME SCIENCE NOTES
        • KCSE BUSINESS STUDIES NOTES
        • COMPUTER STUDIES NOTES LATEST
        • kcse Computer Studies Notes
        • KCSE AGRICULTURE NOTES, SYLLABUS, QUESTIONS, ANSWERS, SCHEMES OF WORK AND OTHERS
      • HUMANITIES >
        • KCSE History Notes Form 1 to 4
        • FREE KCSE CRE NOTES
        • KCSE GEOGRAPHY NOTES
        • IRE NOTES, AUDIOVISUAL, QUESTIONS AND ANSWERS
    • PRIMARY >
      • NOTES >
        • KISWAHILI
        • SOCIAL STUDIES >
          • STANDARD 4: SOCIAL STUDIES
        • SCIENCE
        • ENGLISH >
          • KCPE and Primary Level Compositions
        • MATHEMATICS >
          • KCPE Mathematics Notes
      • EXAMINATIONS >
        • DecaTurbo Online Series Examinations
        • CBC Kiswahili
        • FOCUS A365 SERIES K.C.P.E EXAMINATIONS FOR PRIMARY
        • Standard 8 (std) English Topical Questions
    • Other Supportive Documents >
      • Free Schemes of Work
      • SYLLABUS >
        • Primary 8-4-4 based Syllabus, Objectives and Lessons
        • Primary Mathematics Syllabus
      • MASOMO VIDEOS
  • CURRICULUM
    • NEW CURRICULUM DESIGNS >
      • PRIMARY >
        • PRE PRIMARY ONE CURRICULUM WITH SYLLABUS
        • PRE PRIMARY TWO CURRICULUM WITH SYLLABUS
      • SECONDARY >
        • KNEC KCSE SYLLABUS AND COURSE OUTLINES
      • COLLEGE >
        • Regulations for the TIVET Craft and Diploma Business Examinations
  • HIGH INSTITUTIONS
    • EXAMINATIONS >
      • College and Varsity Past Papers online
    • TUTORIALS >
      • COLLEGE AND UNIVERSITY NOTES AND TUTORIALS
  • CUSTOMER CARE
    • PRICING
    • Contact
    • Help & Support
    • DONATE
    • MPESA FORM
  • BLOGS
    • ENGLISH - EKEGUSII DICTIONARY
  • MEMBERSHIP RESOURCES
    • Assignments and Random Exams
    • TERM 3 2021 PRIMARY PAST REVISION PAPERS
    • SECONDARY EXAMINATIONS
    • Search Free Documents (PDF)
  • Archived Pages
    • C.R.E (CRE) QUESTION AND ANSWERS
    • TOP SECONDARY EXAMS ALL SUBJECTS

Program Control Structures

30/4/2022

0 Comments

 

Program Control Structures

program control structures are blocks of statements that determine how statements are to be executed, in structured programming languages, there are three control structures namely; sequence, selection and iteration (looping)

​Sequence

In this structure, the computer reads instructions from a program file starting from the first top line and proceeding downwards one -by -one to the end. This is called sequential programming execution i.e.
SEQUENCE CONTROL STRUCTURE

​Selection

In selection control, execution of statements depends on a condition which is either a true or false
There are four types of selection controls. Namely:
  • IF.....THEN
  • IF.....THEN.....ELSE
  • NESTED IF
  • CASE SECTION
IF....THEN
The IF....THEN selection is used if only one option is available. All other options are ignored
Format:
IF <condition> THEN
    Statements;
ENDIF
IF....THEN....ELSE
This type of selection is suitable where there are two available options
General Format
IF <condition> THEN
    Statements;
ELSE
    Statements;
EndIF
Nested IF Selection
This type of selection is used where two or more options have to be considered to make a selection.
General Format
IF <condition> THEN
            statements
    ELSE
    IF <condition> THEN
            statements
    ELSE
        IF<condition> THEN
            Statements
    ELSE
            Statements
        ENDIF
    ENDIF
ENDIF
CASE Construct
This is an alternative to the Nested IF especially where there are several options to choose from. Its preferred because it reduces the many lines of code. However, the boolean expression for the case selection can only be expressed using integers and alphabetic characters only. The General format should be
CASE integer OF or
CASE Char OF
Example:
Case x of
label 1: statement 1
label 2: statement 2
label 3: statement 3
.
.
.
label n: statement n-1
Else
statement
Endcase
READ MORE

​Iteration (looping)

Iteration is also referred to as looping or repetition.  Its designed to execute the same block of code again and again until a certain condition is fulfilled.
The three main looping controls are:-
  • The WHILE Loop
  • The REPEAT....UNTIL Loop
  • The FOR Loop
The WHILE Loop
The "WHILE" loop is used if a condition has to be met before the statements within the loop are executed.
General Format
WHILE condition DO
    statement
ENDWHILE
The REPEAT....UNTIL loop
The REPEAT....UNTIL loop allows the statements within it to be executed at least once since the condition is tested at the end of the loop.
General Format
REPEAT
statements
UNTIL <condition>
The FOR Loop
The FOR loop is used in circumstances where the execution of the chosen statements has to be repeated a predetermined number of times.
General Format
//pseudocode for 'FOR" loop that counts from the lower limit
FOR loop variable = lower limit to upper limit DO
statements
ENDFOR
READ MORE

Read More
0 Comments
Print Friendly and PDF

​Program development

15/12/2021

0 Comments

 
QUICK PDF DOWNLOAD
  1. ​Program development
    1. Problem recognition
    2. Problem definition
    3. Program design
    4. Program coding
    5. Program testing
    6. Implementation

PROGRAM DEVELOPMENT.


Stages involved in the program development cycle.

The process of program development can be broken down into the following stages:

  1. Problem recognition (Identification of the problem).
  2. Problem definition.
  3. Program design.
  4. Program coding.
  5. Program testing & debugging.
  6. Program Implementation and maintenance.
  7. Program documentation.

Problem recognition.


Problem recognition refers to the understanding and interpretation of a particular problem.

The programmer must know what problem he/she is trying to solve. He/she must also understand clearly the nature of the problem & the function of the program.

In order to understand a problem, look for the keywords such as compute, evaluate, compare, etc.

Usually, a programmer identifies problems in the environment and tries to solve them by writing a computer program.

There are 3 situations that cause the programmer to identify a problem that is worth solving:

  1. Problems or undesirable situations that prevent an individual or organizations from achieving their purpose.
  2. Opportunity to improve the current program.
  3. A new directive given by the management requiring a change in the current system.

Sample problem: Develop a program that can be used to calculate/find the area of a circle.  Use the equation A = π * r2.

Problem definition (Problem Analysis).


In Problem definition, the programmer tries to define (determine) the:

  1. Output expected from the program.
  2. Inputs needed to generate the output information.
  3. Processing activities (requirements), and
  4. Kind of files which may be needed.
 The programmer should write a narrative on what the program will do, and how it is meant to achieve the intended purpose.  Within this narrative, he/she is required to determine what data is to be input & what information is to be output.

For example:

In calculating the area of any circle, the parameters needed to determine the area of any circle are:

  1. Input:    
    1. Pie (π) which is a constant.
    2. The radius of the circle.
  2. Process:    The formula for calculating area of a circle, which is π * radius * radius.
  3. Output:    The area of the circle (A).
At the end of the problem definition, the programmer is required to write a requirements report/document for the new program.  This document will enable the programmer to come up with a program design that meets the needs at hand.


Note.  Problem definition should be done thoroughly to ensure user satisfaction, and to facilitate the subsequent stages in the program development cycle.  A failure at this stage usually results in a system that will not work as intended, or that may not work at all.


Program design


Program design is the actual development of the program’s process or problem solving logic called the Algorithm.

It involves identifying the processing tasks required to be carried out in order to solve the problem.

The design stage enables the programmer to come up with a model of the expected program (or a general framework (outline) of how to solve the problem, and where possible, break it into a sequence of small & simple steps.
The models show the flow of events throughout the entire program from the time data is input to the time the program gives out the expected information.

  • The processing tasks must be in order & systematic.  Therefore, the programmer identifies the processing tasks required, and the exact order in which they are to be carried out.
  • The design process does not take account of the programming language to be used in the final product, since it only defines program logic.
  • Program design provides for easy maintenance.

Note.  It is important to design programs before entering them into the computer.  The programmer should only attempt to covert a design into a program code after ensuring that it is logically correct.  If possible, check the logical order on the desk.

Some programmers produce rough & ready solutions at a Keyboard, and continue to amend the programs until eventually the program appears to do what was expected.  This is not recommended in programming because of the following reasons:
  1. The final code may not be easy to follow, since it was just cobbled together.
  2. Variable names & specific items of code may not be documented.
  3. Programs produced by continuous amendments & changing of codes mostly lead to unforeseen side effects.
    E.g., there may not have been plan for testing the program or procedures, hence, the program may easily fail.
  4. A programmer may be asked to modify the code at a later date.  Without sufficient documentation, the programmer will be forced to trace through the program in order to gain an insight into how the program functions.

Modular programming

Many programs are non-monolithic (i.e., they are not usually made up of one large block of code).  Instead, they are made up of several units called modules, that work together to form the whole program with each module performing a specific task.
This approach makes a program flexible, easier to read, and carry out error correction.

Program coding


Program coding is the actual process of converting a design model into its equivalent program.

Coding requires the programmer to convert the design specification (algorithm) into actual computer instructions using a particular programming language.

For example;

The programmer may be required to write the program code either in Pascal, C++, Visual Basic or Java, and develop (invent) suitable identifiers, variable names, & their data types.  However, remember that, at this stage the coding is still a Pencil & paper exercise.

The end result of this stage is a source program that can be translated into machine readable form for the computer to execute and solve the target problem.

Rules followed in coding a program.
  1. Use the standard identifiers or reserved words.
  2. Make the program more readable by using meaningful identifiers.
  3. Don’t use similar variables.
  4. Keep spellings as normal as possible.
  5. Use comments to explain variables & procedures.  This makes the program readable.
  6. Avoid tricks – write the program using straightforward codes that people can readily understand.
  7. Modularize your program.
Sample programs written in Pascal language.

Example 1:

Develop a program code that would be used to solve the equation of a straight line given by the expression: Y = mx + c

Program StraighLine (input, output);
VAR
y, m, x, c: INTEGER;
BEGIN
    Writeln (‘Input the value of M’);
Readln (M);
    Writeln (‘Input the value of X’);
Readln (X);
    Writeln (‘Input the value of C’);
Readln (C);
Y: = (m * x) +c;
    Writeln (‘The value of y is:’, Y);
END.


Explanation of the Pascal source code above

Program StraightLine (input, output);    This is the program Header.
The word “Program” indicates the beginning of the program whose name is StraightLine.
The (input, output) statements shows that the program expects some input from the Keyboard and display the output on the Screen.
VAR is short form for Variable.  A variable is a location for data in the computer memory.
This statement tells the computer that variables are about to be declared.  When a variable is declared, the computer sets aside some memory space to store a value in the variable.
y, m, x, c: INTEGER;    Four variables of type Integer have been declared.  This means that, the memory spaces that will be set aside can only hold values that are whole numbers.
BEGIN    The Begin statement marks the start of the program body.  Statements in this section are executed by the computer.  E.g., execution starts by asking the user to input the value of m.
Writeln (‘Input the value of M’);    The Writeln statement displays whatever is between the inverted commas in the brackets.  The statements will be sent to the screen exactly the way they appear in the brackets.  This is because; the inverted commas are meant to make the output readable on the screen.
To display the value held in a variable on the screen, remove the inverted commas and write the name of the variable in the brackets, e.g., Writeln (y) will display the value held in the variable y.
Readln (M);    The Read or Readln statement reads a value and stores it in a variable.
When the program is running, a Read/Readln statement in the code will displays blinking cursor that indicates to the user where to type the input.
Y: = (m * x) +c;    Calculates the value of y.  in Pascal, the symbol ‘: =’ is called the Assignment statement.
The values on the right are calculated then the answer stored in the variable y which is on the left of the assignment symbol.
Writeln (‘The value of y is:’, Y);    The Writeln displays the value held in the variable y on the screen.
Note.  Y is not within the inverted commas.
END.    The ‘END.’ statement shows the end of a program.

Example 2:


Program AreaCircle (input, output);
CONST
Pi = 3.142;
VAR
Radius, Area: REAL;
BEGIN
Writeln (‘Enter the radius’);
Readln (Radius);
Area: = Pi * Radius * Radius;
Writeln (‘The Area is’, Area);
END.


Explanation of Pascal source code

Program AreaCircle (input, output);    The Header of the program.
The statements in ( ) shows that the user inputs data via Keyboard and the program display information on the Screen.
CONST
Pi = 3.142;    A constant has been declared with a name Pi and value 3.142.
VAR
Radius, Area: REAL;    Variables with fractional parts have been declared.
BEGIN    Marks the beginning of the program body.
Writeln (‘Enter the radius’);    Displays on the screen the string between the inverted commas.
Readln (Radius);    Displays a blinking cursor that tells the user that an input is needed before the program can continue.
Area: = Pi * Radius * Radius;    Calculates the Area.  An assignment statement (: =) has been used.
Writeln (‘The Area is’, Area);    Displays the value stored in the variable Area.
END.    Marks the end of the program.

Revision Questions.

  1. State the rules followed in coding a program.

Program Testing and Debugging


After designing & coding, the program has to be tested to verify that it is correct, and any errors detected removed (debugged).

TESTING:


Testing is the process of running computer software to detect/find any errors (or bugs) in the program that might have gone unnoticed.

During program testing, the following details should be checked;

  1. The reports generated by the system.
  2. The files maintained in connection to the system’s information requirements.
  3. The input to the system.
  4. The processing tasks.
  5. The controls incorporated within the system.
Note.  The testing process is a continuous process, and it ends only when the Programmer & the other personnel involved are satisfied that when operational, the program will meet the objectives and the growing demands of the organization.

Types of program errors

There are 5 main types of errors that can be encountered when testing a program.  These are:

  1. Syntax errors.
  2. Run-time (Execution) errors.
  3. Logical (arithmetic) errors.
  4. Semantic errors.
  5. Lexicon errors.

Syntax errors

Every programming language has a well-defined set of rules concerning formal spellings, punctuations, naming of variables, etc.  The instructions are accepted only in a specified form & and must be obeyed by the programmer.  

Syntax errors are therefore, programming errors/mistakes that occur if the grammatical rules of a particular language are not used correctly.

Examples:
  1. Punctuation mistakes, i.e., if the programmer does not use the right punctuations & spaces needed by the translator program, e.g., omitting a comma or a semicolon.
  2. Improper naming of variables.
  3. Wrong spellings of user defined and reserved words.
Reserved words are those words that have a special meaning to the programming language, and should not be used by the programmer for anything else.

Syntax errors are committed by the programmer when developing, or transcribing the program, and can be detected by the language translators, such as the Compiler as it attempts to translate a program.  Such errors must be corrected by the programmer before the program runs.

Logical (arithmetic) errors.

These are errors in the program logic.

Logical errors relate to the logic of processing followed in the program to get the desired results.  E.g., they may occur as a result of misuse of logical operators.

Logical errors cannot be detected by the translator.  The programmer will detect them when the program results are produced.

The program will run, but give the wrong output or stop during execution.

Run-time (Execution) errors.

These errors occur during program execution.

Run-time (execution) errors occur when the programmer introduces new features in the program, which are not part of the translator’s standards.

For example; they may occur if:
  1. The computer is asked to divide a number by zero.
  2. The number generated as a result of an instruction is too large to fit in a memory location.
  3. When you raise a number to a very big power that cannot be accommodated in the Register’s structure of the computer.
  4. In case of a closed loop in the program, leading to a set of instructions being executed repetitively for a long time.
Execution errors are not detected by the translator programs, but are detected by the computer during execution.  Sometimes, execution errors may lead to premature end of a program.

To detect and eliminate Execution errors, a test run should be performed on the program after it has been translated.

Semantic errors.

These are meaning errors.  They occur when the programmer develops statements, which are not projecting towards the desired goal.  Such statements will create deviations from the desired objectives.

Semantic errors are not detected by the computer.  The programmer detects them when the program results are produced.

Example;


a).    IF GP>=1500 OR 2200 THEN
TAX: = GP - (GP * 13%)

b).    IF GP>=1500 AND GP<= 2200 THEN
TAX: = GP - (GP * 13%)

In the 1st statement, if the selection is between 1500 & 2200, the computer will pick only 1500 & 2200, and the other values will not be touched.

In the 2nd statement, the computer will be able to pick all the values between 1500 & 2200 because of the ‘AND’ operator.

Lexicon errors.

These are the errors, which occur as a result of misusing Reserved words (words reserved for a particular language).

Revision Questions.

  1. State the three types of errors that can be experienced in program testing, and how each can be detected.
  2. Syntax errors can be detected by the help of translators while logical errors are detected differently.  Explain FIVE methods which can be used to detect Logical errors.

DEBUGGING:

The term Bug is used to refer to an error in a computer program.

Most programming errors often remain undetected until an attempt is made to translate a program.

The most common errors include:-
  • Improperly declared Constants and Variables.
  • A reference to undeclared variable.
  • Incorrect punctuation.

Debugging is therefore, the process of detecting, locating & correcting (removing, eliminating) all errors (mistakes or bugs) that may exist in a computer program.

TYPES OF TESTING (Methods of error detection)


For the program to be assumed as correct, several testing needs to be conducted by the programmer to ascertain/establish their validity.

There are several methods of testing a program for errors.  These include:
  1. Dry running (Desk checking).
  2. Translator system checking.
  3. Functional testing.
  4. Use of Test data.
  5. Use of debugging utilities.
  6. Diagnostic procedures.
  7. System test with actual data.

Dry Running (Desk checking):

Dry running is a method of checking a program for errors by making the corrections on a paper before entering it in the program editor.

It involves going through the program while still on paper verifying & validating its possible results.  If the final results agree with the original test data used, the programmer can then type the program into the computer and translate it.

  • Dry running helps the programmer to identify the program instructions, detect the most obvious syntax and logical errors, & the possible output.
  • Dry running is much faster.  This is because; it involves the use of human brain as the processor, which has got a well inbuilt common sense.

Translator system checking:

This is a type of testing, which involves the computer & the translator programs.  

After entering the program, it is checked using a translator to detect any syntax errors.  The translator can be a Compiler or an Interpreter, which goes through the set of instructions & produces a list of errors, or a program/statement listing which is free from errors.

Functional testing (White-box testing):

This type of testing is based upon examining the internal structure of a program & selecting test data, which give rise to the alternative cases of control flow.

Use of Test data.

The accuracy of a program can be tested by inputting a set of values referred to as Test data.  The test data is designed to produce predictable output.

There are 2 types of test data;
  1. Real data (live data): - test data obtained from the real problem environment (practical applications).
  2. Dummy data: - assumed test data.
The programmer invents simple test data, which he/she uses to carry out trial runs of the new program.  At each run, the programmer enters various data variations including data with errors to test how the system will behave.  For example, if the input required is of numeric type, the programmer may enter alphabetic characters.  The programmer will then compare the output produced with the predicted (actual) output.

Notes.

  • Where possible, the program should be tested using the same test data that was used for desk checking.  More strict/rigid tests should be applied on the program in order to test the program to its limits.
  • Only Logical errors & Semantic errors can be corrected by the programmer using test data.
  • A good program should not crash due to incorrect data entry but should inform the user about the irregularity and request for the correct data to be entered.

Use of debugging utilities.

After the program has been entered in the program editor, debugging utilities which are built in the computer can be run during translation to detect any syntax errors in the program.
The errors are corrected and the debugging process is repeated again to find out more errors, before the program is executed.

Diagnostic procedures.

For complex programs, diagnostic procedures, such as Trace routines, may be used to find logical errors.
A Trace prints out the results at each processing step to enable errors to be detected quickly.

System Test with actual data.

This is whereby the new program is run in parallel with the existing system for a short time so that results can be compared and adjustments made.  In such cases, the system test is made using actual data.

Review Questions.

  1. Differentiate between Testing and Debugging.
  2. What is Dry running?

Implementation and Maintenance.


IMPLEMENTATION

Implementation refers to the actual delivery, installation and putting of the new program into use.

The program is put into use after it is fully tested, well documented, and after training the staff who will be involved in the running of the new program.

Structured Walk Through:


It is an organized style of evaluating/reviewing a program by a team of other programmers, which then reports to the programming team.

REVIEW AND MAINTENANCE.


Once the program becomes operational, it should be maintained throughout its life, i.e., new routines should be added, obsolete routines removed, & the existing routines adjusted so that the program may adapt to enhanced functional environments.

The main objective of maintenance is to keep the system functioning at an acceptable level.
Program maintenance mainly involves: -

  • Correcting errors that may be encountered after the program has been implemented or exposed to extensive use.
  • Changing procedures.
  • Hardware and software maintenance.
  • Changing parameters and algorithms used to develop the original programs.
  • Making any adjustments as new technology comes.
Note.  Program maintenance runs parallel to the maintenance of the program documentation, i.e., any time maintenance is carried out on the program, the documentation should also be updated to convey the right image of the system.

Program documentation.

After writing, testing, and debugging a program, it must be documented.  In other words, the programmer should describe all what he was doing during the program development stages.

Program documentation is the writing of supportive materials explaining how the program can be used by users, installed by operators, or modified by other programmers.

Note.  All the program development activities (i.e., from the initial stage up to the complete program) should be documented/recorded in order to assist in the development of the program, future modification of the program, general maintenance, machine & software conversion at a later date, and program changeover.

Documentation can either be; Internal or External.

Internal documentation is the writing of non-executable lines (comments) in the source program that help other programmers to understand the code statements.

External documentation refers to reference materials such as user manuals printed as booklets.

Types of program documentation.


There are 3 target groups for any type of documentation:

  1. User-oriented documentation.
    This enables the user to learn how to use the program as quickly as possible, and with little help from the program developer.
  2. Operator-oriented documentation:
    This is meant for computer operators such as the technical staff.  It is used to help them install & maintain the program.
  3. Programmer-oriented documentation:
    This is a detailed documentation written for skilled programmers.  It provides the necessary technical information to help in future modification of the program.
Some documents used in program documentation.
  1. User guide/ manual.
    This is a manual provided for an end-user to enable him/her use or operate the program with minimal or no guidance.
    A User guide is used in user-oriented documentation.
  2. Reference guide.
    It is used by someone who already knows how to use the program but needs to be reminded about a particular point or obtain more detailed information about a particular feature.
  3. Quick Reference guide.
    This could be a single sheet or card small enough to fit into a pocket.  It is used by the user to get help for the common tasks carried out within the program.
  4. Technical manuals.
    They are intended for System analysts & Programmers.  They assist in maintaining & modifying the program design and code.

Contents in a program document.

Documentation includes:
  1. Title of the program.
  2. Function of the program.
  3. Language used.
  4. Hardware & Software required to support the processing of the system.
  5. File specifications (details of the data structures used, & details of how data files are to be organized, accessed, and kept secure).
  6. Limitations of the program.
  7. Format of the input & the output expected.
  8. Design of the program using the design tools (i.e., detailed algorithms & procedures used).
  9. A listing of the Source program and the program flowcharts.
  10. A carefully devised set of Test data, and a table of expected results.
  11. Detailed instructions on how to run the program.

Review Questions.

  1. What is program designing?
  2. (a). Define program documentation.
    (b). What does a program documentation contain?
  3. Briefly explain how each of the following documents are useful in programming?
    (a).    User manual / guide.
    (b).    Reference guide.
    (c).    Quick reference guide.
  4. Program documentation is different from Implementation. Explain.
  5. Outline and briefly explain the stages involved in program development.

Read More
0 Comments
Print Friendly and PDF

Linkers and Loaders, Review Questions on topic.

20/11/2021

0 Comments

 

​​Linkers & Loaders

​Computer programs are usually developed in Modules or Subroutines (i.e., program segments meant to carry out the specific relevant tasks).  During program translation, these modules are translated separately into their object (machine) code equivalents.

The Linker is a utility software that accepts the separately translated program modules as its input, and logically combines them into one logical module, known as the Load Module that has got all the required bits and pieces for the translated program to be obeyed by the computer hardware.

The Loader is a utility program that transfers the load module (i.e. the linker output) into the computer memory, ready for it to be executed by the computer hardware.


​Syntax

​Each programming language has a special sequence or order of writing characters.

The term Syntax refers to the grammatical rules, which govern how words, symbols, expressions and statements may be formed & combined.

​Semantics

​These are rules, which govern the meaning of syntax.  They dictate what happens (takes place) when a program is run or executed.

​Review Questions.

  1. Define the following terms:
    1. Computer program.
    2. Programming.
    3. Programming language.
  2. With reference to programming, distinguish between Source program and Object code.
  3. What is the function(s) of: Assemblers, Interpreters and Compilers in a computer system?

    1. What are the main functions of a Compiler?
    2. Differentiate between a Compiler and an Interpreter.



Read More
0 Comments
Print Friendly and PDF

Definition and development of Algorithm e.g. pseudo-code, flow chart

18/11/2021

0 Comments

 

DEFINITION AND DEVELOPMENT OF ALGORITHM E.G. PSEUDO-CODE, FLOW CHART

Definition and development of Algorithm e.g.
  • pseudo-code
    A pseudo code is a set of statements written in a human readable language but expressing the processing logic of a program.
    Pseudo codes are not executable by the computer
Guidelines for designing a good pseudo code
To design a good pseudocode, proceed as follows
  • The statement must be short, clear and readable
  • The statements must not have more than one meaning i.e. should be unambiguous
  • The pseudo code lines should be clearly outlined and indented clearly
  • A pseudo code should show clearly the start and stop of executable statements and the control structures (to be discussed later in the section)
  • The input, output and processing statements should be clearly stated, using keywords such as flow chart


FLOWCHART
  • Flow charts are used to represent any well defined sequence of activities. they are used to convey in diagrammatic form, the logic, processing operations and flow of control required of a computer program
Uses Of Flowcharts
Flowcharts are used by programmers to:
  • To plan the structure of a program before it is written
  • To describe the structure of a program after it has been written

Read More
0 Comments
Print Friendly and PDF

​Description of terms: assembler, compiler, interpreter, source program, object program

18/11/2021

0 Comments

 
  1. ​Description of terms
    1. assembler
    2. compiler
    3. interpreter
    4. source program
    5. object program

​LANGUAGE TRANSLATORS

​A computer uses & stores information in binary form, and therefore, it cannot understand programs written in either high-level or low-level languages.  This means that, any program code written in Assembly language or high-level language must be translated into Machine language, before the computer can recognize & run these programs.  
A Translator is special system software used to convert the Source codes (program statements written in any of the computer programming languages) to their Object codes (computer language equivalents).

The Translators reside in the main memory of the computer, and use the program code of the high-level or Assembly language as input data, changes the codes, and gives the output program in machine-readable code.
In addition, translators check for & identify some types of errors (e.g., Syntax/grammatical errors) that may be present in the program being translated.  They will produce error messages if there is a mistake in the code.

Each language needs its own translator.  Generally, there are 3 types of language translators:
  1. Assembler.
  2. Interpreter.
  3. Compiler.

Note. Interpreters & Compilers translate source programs written in high-level languages to their machine language equivalents.


Assembler

​An assembler translates programs written in Assembly language into machine language that the computer can understand and execute.

​Functions of an Assembler.

  1. It checks whether the instructions written are valid, and identifies any errors in the program.
    The Assembler will display these errors as well as the complete source and object programs.  If the program has no errors, the job control will let it run immediately, or save the object program so that it may run it later without translating it again.
  2. It assigns memory locations to the names the programmer uses.E.g., the Assembler keeps a table of these names so that if an instruction refers to it, the Assembler can easily tell the location to which it was assigned.
  3. It generates the machine code equivalent of the Assembly instructions.
    Usually, the Assembler generates a machine code only when no errors are detected.  Some of the errors include; 
    - Typing mistakes. 
    - Using the wrong format for an instruction.
    - Specifying a memory location outside the range 0 – 2047.

Note.  The Assembler cannot detect Logic errors.  The programmer knows of these errors only when the program is run & the results produced are incorrect (not what the programmer expected). The programmer must therefore, go through the program & try to discover why an incorrect result was being produced.

Compiler

​A compiler translates the entire/whole source program into object code at once, and then executes it in machine language code.  These machine code instructions can then be run on the computer to perform the particular task as specified in the high-level program.

The process of translating a program written in a high-level source language into machine language using a compiler is called Compilation.

For a given machine, each language requires its own Compiler.  E.g., for a computer to be able translate a program written in FORTRAN into machine language; the program must pass through the FORTRAN compiler (which must ‘know’ FORTRAN as well as the Machine language of the computer).

The object code file can be made into a fully executable program by carrying out a Linking process, which joins the object code to all the other files that are needed for the execution of the program.  After the linking process, an executable file with an .EXE extension is generated.  This file is stored on a storage media.

Points to note.
  • The job of a Compiler is much more difficult than that of an Assembler in that, a single statement in a high-level language is equivalent to many machine instructions.
  • The format of an Assembly instruction is fairly fixed, while high-level languages give a lot of freedom in the way the programmer writes statements.


​Functions of a compiler.

A Compiler performs the following tasks during the compilation process:
  1. It identifies the proper order of processing, so as to execute the process as fast as possible & minimize the storage space required in memory.
  2. It allocates space in memory for the storage locations defined in the program to be executed.
  3. It reads each line of the source program & converts it into machine language.
  4. It checks for Syntax errors in a program (i.e., statements which do not conform to the grammatical rules of the language).  If there are no syntax errors, it generates machine code equivalent to the given program.
  5. It combines the program (machine) code generated with the appropriate subroutines from the library.
  6. It produces a listing of the program, indicating errors, if any.

​Differences between Compilers and Interpreters

Interpreter

​Interpreter
  1. Translates & executes each statement of the source code one at a time.
    The source code instruction is translated & immediately obeyed by the computer hardware before the next instruction can be translated.
    (Translation & execution go together).
  2. Translates the program each time it is needed for execution; hence, it is slower than compiling.
  3. Interpreted object codes take less memory compared to compiled programs.
  4. 4. For an Interpreter, the syntax (grammatical) errors are reported & corrected before the execution can continue.
  5. An Interpreter can relate error messages to the source program, which is always available to the Interpreter.  This makes debugging of a program easier when using an Interpreter than a Compiler.
​Compiler
  1. Translates all the source code statements at once as a unit into their corresponding object codes, before the computer can execute them.
    A Compiler translates the entire source program first to machine code, and then the code is executed by the CPU.
    (Translation & execution are separate phases)
  2. Compiled programs (object codes) can be saved on a storage media and run when required; hence executes faster than interpreted programs.
  3. Compiled programs require more memory as their object files are larger.
  4. For a Compiler, the syntax errors are reported & corrected after the source code has been translated to its object code equivalent.
  5. Once the source program has been translated, it is no longer available to the Compiler, so the error messages are usually less meaningful.  
​An interpreter translates a source program word by word or line by line.  This allows the CPU to execute one line at a time.

The Interpreter takes one line of the source program, translates it into a machine instruction, and then it is immediately executed by the CPU.  It then takes the next instruction, translates it into a machine instruction, and then the CPU executes it, and so on.

The translated line is not stored in the computer memory.  Therefore, every time the program is needed for execution, it has to be translated.

Source Program

​Source program (source code)

The term Source program refers to program statements that the programmer enters in the program editor window, and which have not yet been translated into machine-readable form.

Source code is the code understood by the programmer, and is usually written in high-level language or Assembly language.

Object Code

Object code (object program).

The term Object code refers to the program code that is in machine-readable (binary) form.

This is the code/language the computer can understand, and is produced by a Compiler or Assembler after translating the Source program into a form that can be readily loaded into the computer.



Read More
0 Comments
Print Friendly and PDF

Advantages and disadvantages of low and high level languages.

18/11/2021

0 Comments

 

​Advantages and disadvantages of low and high level languages.

Machine language
  1. Instruction set is made up of binary digits (0’s & 1’s).
  2. Instruction is made of 2 parts: operation code & operand.
  3. No translation is needed.  (This is the computer language; hence, the computer understands it directly).
  4. Executed by the hardware directly & is faster.
  5. Difficult to learn, develop & maintain.
  6. Programs are lengthy & tedious.
  7. It is time-consuming to develop machine code programs.
  8. Used in applications where efficient use of the CPU time is necessary, e.g., developing Operating systems & other Control programs that coordinate the working of peripherals.
Assembly language
  1. Instruction set is made up of Mnemonics & labels.
  2. Instruction is made up of 2 parts: operation code & operand, but comments can be added.
  3. Uses an Assembler to convert the assembly language source codes to their object code equivalents
  4. Executed faster than High-level, but slower than the machine code programs.
  5. It’s easier to learn, develop & maintain as compared to machine code programs.
  6. Like machine code language, the programs are lengthy & tedious.
  7. They take a shorter time to develop as compared to machine code programs, but take longer than High-level language programs.
  8. Like machine language, Assembly language programs are used in applications where efficient use of the CPU time is necessary.
High-level languages
  1. Instruction set is similar to English language statements & mathematical operators.
  2. The instruction varies depending on the particular language.
  3. Uses compiler or interpreter
    Compiler translates all the source code at once into object code; Interpreter translates line by line.
  4. Translation & execution is very slow.
  5. Easy to learn, develop, maintain and use.
  6. Programs are shorter & simpler than Machine & assembly lang. programs.
  7. Developing High-level language programs takes very short time.
  8. Most High-level languages are general-purpose, & can be used to do almost all computer-processing tasks.

Read More
0 Comments
Print Friendly and PDF

​Levels of programming languages

18/11/2021

0 Comments

 
​Levels of programming languages
  1. Low level language
    1. machine
    2. assembly
  2. High Level languages
    1. third Generation Languages (3GLs)
    2. four Generation Languages (4 GLs)
    3. Object Oriented Programming (OOPs)
    4. Internet (scripting) Programming Languages

​LEVELS OF PROGRAMMING LANGUAGES

​There are many programming languages.  The languages are classified into 2 major categories: 
  1. Low-level programming languages.
  2. High-level programming languages.
Each programming language has its own grammatical (syntax) rules, which must be obeyed in order to write valid programs, just as a natural language has its own rules for forming sentences.


​LOW-LEVEL LANGUAGES

These are the basic programming languages, which can easily be understood by the computer directly, or which require little effort to be translated into computer understandable form.
They include:
  1. Machine languages.
  2. Assembly languages.

​Features of low-level languages

  1. They are machine hardware-oriented.
  2. They are not portable, i.e., a program written for one computer cannot be installed and used on another computer of a different family.
  3. They use Mnemonic codes.
  4. They frequently use symbolic addresses.

​Machine languages (1st Generation languages)

​Machine language is written using machine codes (binary digits) that consist of 0’s & 1’s.

The computer can readily understand Machine code (language) instructions without any translation.

A programmer is required to write his program in strings of 0’s & 1’s, calculate & allocate the core memory locations for his data and/or instructions.

Different CPU’s have different machine codes, e.g., codes written for the Intel Pentium processors may differ from those written for Motorola or Cyrix processors.  Therefore, before interpreting the meaning of a particular code, a programmer must know for which CPU the program was written.

A machine code instruction is made up of 2 main parts; 
  1. An Address (operand):
    It specifies the location (address) of the computer memory where the data to be worked upon can be found.
  2. A Function (operation) code:
    It states to the Control Unit of the CPU what operation should be performed on the data/item held in the address, e.g., Addition, Subtraction, Division, Multiplication, etc.

Note.  The computer can only execute instructions which are written in machine language.  This is because; it is the only language which the computer can understand.  Therefore, any program written in any other programming language must first be translated into machine language (binary digits) before the computer can understand.

​Assembly language (2nd Generation Languages).

Assembly languages were developed in order to speed up programming (i.e., to overcome the difficulties of understanding and using machine languages).  

The vocabulary of Assembly languages is close to that of machine language, and their instructions are symbolic representations of the machine language instructions.
  • Assembly language programs are easier to understand, use & modify compared to Machine language programs.
  • Assembly language programs have less error chances.  

To write program statements in Assembly language, the programmer uses a set of symbolic operation codes called Mnemonic codes.

The code could be a 2 or 3 shortened letter word that will cause the computer to perform specific operation.  E.g., MOV – move, ADD - addition, SUB – subtraction, RD - read.

Example;
RD PAT, 15 (read the value 15 stored in the processor register named PAT)
SUB PAT, 10 (subtract 10 from the value in register PAT)


A program written in an Assembly language cannot be executed/obeyed by the computer hardware directly.  To enable the CPU understand Assembly language instructions, an Assembler (which is stored in a ROM) is used to convert them into Machine language.
​
The Assembler accepts the source codes written in an Assembly language as its input, and translates them into their corresponding computer language (machine code/ object code) equivalent.

Comments are incorporated into the program statements to make them easier to be understood by the human programmers.

Assembly languages are machine-dependent. Therefore, a program written in the Assembly language for a particular computer cannot run on another make of computer.

​Advantages of Low-level languages

  1. The CPU can easily understand machine language without translation.
  2. The program instructions can be executed by the hardware (processor) much faster.  This is because; complex instructions are already broken down into smaller simpler ones.
  3. Low-level languages have a closer control over the hardware, are highly efficient & allow direct control of each operation.
  4. They are therefore suitable for writing Operating system software & Game programs, which require fast & efficient use of the CPU time.
  5. They require less memory space.
  6. Low-level languages are stable, i.e., they do not crash once written.

​Disadvantages of Low-level languages

Very few computer programs are actually written in machine or Assembly language because of the following reasons;
  1. Low-level languages are difficult to learn, understand, and write programs in them.
  2. Low-level language programs are difficult to debug (remove errors from).
  3. Low-level languages have a collection of very detailed & complex instructions that control the internal circuiting of the computer.  Therefore, it requires one to understand how the computer codes internally.
  4. Relating the program & the problem structures is difficult, and therefore cumbersome to work with.
  5. The programs are very long; hence, writing a program in a low-level language is usually tedious & time consuming.
  6. The programs are difficult to develop, maintain, and are also prone to errors (i.e., it requires highly trained experts to develop and maintain the programs).
  7. Low level languages are machine-dependent (specific), hence non-portable.
  8. This implies that, they are designed for a specific machine & specific processor, and therefore, cannot be transferred between machines with different hardware or software specifications.
  9. It is not easy to revise the program, because this will mean re-writing the program again.


​HIGH-LEVEL PROGRAMMING LANGUAGES

​High-level languages were developed to solve (overcome) the problems encountered in low-level programming languages.

The grammar of High-level languages is very close to the vocabulary of the natural languages used by human beings.  Hence; they can be read and understood easily even by people who are not experts in programming.  

Most high-level languages are general-purpose & problem-oriented.  They allow the programmer to concentrate on the functional details of a program rather than the details of the hardware on which the program will run.

High-level language programs are machine-independent, (i.e., they do not depend on a particular machine, and are able to run in any family of computers provided the relevant translator software is installed).

Programs written in a high-level language cannot be obeyed by the computer hardware directly.  Therefore, the source codes must be translated into their corresponding machine language equivalent. The translation process is carried out by a high-level language software translator such as a Compiler or an Interpreter.

​Features of high-level programming languages.

  1. They contain statements that have an extensive vocabulary of words, symbols, sentences & mathematical expressions, which are very similar to the normal English language.
    Example; 
    Read (TaxablePay);
    IF TaxablePay<1000 THEN
    Tax: =0;
    ELSE
    Tax: =TaxRate * TaxablePay;
    Write (Tax: 6:2);
  2. Allow modularization (sub-routines).
  3. They are ‘user-friendly’ and problem-oriented rather than machine-based.  This implies that, during a programming session, the programmer concentrates on problem-solving rather than how a machine operates.
  4. They require one to be obey a set of rules when writing the program.
  5. Programs written in high-level languages are shorter than their low-level language equivalents, since one statement translates into several machine code instructions.
  6. The programs are portable between different computers.

​Purpose of High-level languages.

  1. To improve the productivity of a programmer.  This is because; the source programs of high-level languages are shorter than the source programs of low-level languages, since one statement translates into several machine code instructions.
  2. To ease the training of new programmers, since there is no need to learn the detailed layout of a procession/sequence.
  3. To speed up testing & error correction.
  4. To make programs easy to understand & follow.

​Advantages of High-level languages.

  1. They are easily portable, i.e., they can be transferred between computers of different families and run with little or no modification.
  2. High-level language programs are short, and take shorter time to be translated.
  3. They are easy to lean, understand and use.
  4. They are easy to debug (correct/remove errors), & maintain.
  5. High level language programs are easy to modify, and also to incorporate additional features thus enhancing its functional capabilities.
  6. They are ‘user-friendly’ & problem-oriented; hence, can be used to solve problems arising from the real world.
  7. They enable programmers to adapt easily to new hardware.  This is because; they don’t have to worry about the hardware design of the computer.
  8. High-level language programs are self-documenting, i.e., the program statements displays the transparency of purpose making the verification of the program easy.
  9. High level languages are more flexible; hence, they enhance the creativity of the programmer and increase his/her productivity in the workplace.

​Disadvantages of using High-level languages

  1. High-level languages are not machine-oriented; hence, they do not use of the CPU and hardware facilities efficiently.
  2. The languages are machine-independent, and cannot be used in programming the hardware directly.
  3. Each high-level language statement converts into several machine code instructions.  This means that, they use more storage space, and it also takes more time to run the program.
  4. Their program statements are too general; hence, they execute slowly than their machine code program equivalents.
  5. They have to be interpreted or compiled to machine-readable form before the computer can execute them.
  6. The languages cannot be used on very small computers.  
  7. The source program written in a high-level language needs a Compiler, which is loaded into the main memory of the computer, and thus occupies much of memory space.  This greatly reduces the memory available for a source program.

​TYPES OF HIGH-LEVEL LANGUAGES

High-level languages are classified into five different groups:
  1. Third generation languages (Structured / Procedural languages).
  2. Fourth generation languages (4GLs).
  3. Fifth generation languages (5GLs)
  4. Object-oriented programming languages (OOPs).
  5. Web scripting languages.

The various types of high-level languages differ in:
  • The data structures they handle.
  • The control structures they support.
  • The assignment instructions they use.
  • Application areas, e.g., educational, business, scientific, etc.

​STRUCTURED LANGUAGES

A structured (procedural) language allows a large program to be broken into smaller sub-programs called modules, each performing a particular (single) task.  This technique of program design is referred to as structured programming.

Structured programming also makes use of a few simple control structures in problem solving.  The 3 basic control structures are:
  • Sequence
  • Selection.
  • Iteration (looping).

​Advantages of structured programming.

  1. It is flexible.
  2. Structured programs are easier to read.
  3. Programs are easy to modify because; a programmer can change the details of a section without affecting the rest of the program.
  4. It is easier to document specific tasks.
  5. Use of modules that contain standard procedures throughout the program saves development time.
  6. Modules can be named in such a way that, they are consistent and easy to find in documentation.
  7. Debugging is easier because; each module can be designed, coded & tested independently.

​Examples of Third generation programming languages include:

  1. ​BASIC (Beginners All-purpose Symbolic Instructional Code).
    BASIC is a simple general-purpose high-level language used in most computer processing tasks such as developing business and educational applications.
    It is easy to learn & use; hence, suitable for students who wish to easily learn programming.  
    Translation in most versions of BASIC is carried out by an Interpreter.
    Disadvantages of BASIC.
    -
    BASIC is available in so many versions with different dialects/languages & therefore, it has no standard.
    -Some dialects are limited to data & control structures they support.
    -Some versions of BASIC offer limited facilities in terms of structured programming & meaningful variable names.
  2. PASCAL
    PASCAL is a general-purpose, high-level programming language, which was named after a French mathematician called Blaise Pascal.
    It was developed as an academic tool to help in the teaching and learning of structured programming.
    PASCAL supports structured programming, i.e., it uses procedures & functions, which allow a ‘top-down’ approach to solving problems.  
    -It is not easy to learn because; it has strict rules in its grammar on typing of variables (data names) & declarations.
    -It is poor (has limited ability) on handling of data files.
  3. COBOL (Common Business Oriented Language)
    COBOL is designed for developing programs that solve business problems, e.g., can be used to develop commercial data processing applications such as computer-based inventory control systems. COBOL is mostly used where large amounts of data are to be handled, because it supports powerful data & control structures. COBOL programs are semi-compiled, and the intermediate code is interpreted. A program written in COBOL language consists of 4 divisions: -
    (i). Identification division:  Where the programmer & the program details are specified, e.g., program ID, programmer name, etc.
    (ii). Environment division: Where the equipment to be used by the source & the object programs are defined, e.g., the computer hardware.
    (iii). Data division:  Where the various files to be used by the program are described, e.g., a description of the input files.
    (iv). Procedure division:  Where all the procedures required to manipulate/interrelate the data into information are defined. 
    Advantages of COBOL.
    -It is easy to read.
    -It is portable, i.e., can be used on different types of computers.  This is because; it has an American National Institute standard.
    American National Standards Institute (ANSI): – An international organization that devised/ invented the group of standardized symbols used in flowcharting.

    -It is widely used, and has a pool of skilled programmers.
    Disadvantage of COBOL.
    The structure of a COBOL program is too long even for simple programs.
    E.g., consider the following assignment statement:
    DIVIDE A into B giving C. 
    This statement when used in BASIC language can much short ‘C=A/B’.  However, notice that the COBOL statement above is more self defining.
  4. FORTRAN (FORmula TRANslator)
    It was developed for mathematicians, scientists and engineers.  It provides an easier way of writing scientific & engineering applications.
    FORTRAN statements are mostly in form of mathematical expressions; hence, it is useful in writing of programs that can process numeric data.
    FORTRAN programs are compiled.
    Advantages of FORTRAN.
    -It is portable, i.e. it can be used on different types of computers.
    Disadvantage of FORTRAN.
    It is not suited for business applications.
  5. Ada
    This language was named after the first lady programmer Ada Lovelace.
    It is suitable for developing military, industrial and real-time systems.
  6. C
    C is mainly used for developing system software such as the operating system as well as developing the application packages.
    It has powerful commands that permit the rapid development of programs, and allows direct control over the hardware. 
    Disadvantage of C
    It is difficult to read & learn because of its strict dialect rules.
  7. LOGO
    LOGO was designed for educational use in which children can explore & develop concepts through programming the movement of a pen.
  8. COROL
    COROL is used in Real-time processing.
    COROL programs are compiled.
  9. RPG (Report Program Generator)
    RPG is used in report generating applications, (i.e. it is designed to facilitate the output of reports of business data).
    A Report generator is a software tool that extracts stored data to create customized reports that are not normally/usually produced by existing applications.
  10. SNOBOL (String Oriented Symbolic Language).
    ​It is a high-level language designed to manipulate strings of characters.  It is therefore used for non-numeric applications.

​FOURTH GENERATION LANGUAGES (4GL’S).

​4GLs make programming even easier than the 3GLs because; they present the programmer with more programming tools, such as command buttons, forms, textboxes etc.  The programmer simply selects graphical objects called controls on the screen, and then uses them to create designs on a form by dragging a mouse pointer.

The languages also use application generators (which in the background) to generate the necessary program codes; hence, the programmer is freed from the tedious work of writing the code.

4GLs are used to enquire & access the data stored in database systems; hence, they are described as the Query languages.

​Purpose of fourth generation languages.

The 4GL’s were designed to meet the following objectives: -
  1. To speed up the application-building process, thereby increasing the productivity of a programmer.
  2. To enable quick & easy amendments and alteration of programs.
  3. To reduce development & maintenance costs.
  4. To make languages user-friendly.  This is because, the 4GL’s are designed to be user-oriented, unlike the 3rd generation languages which are problem & programmer oriented.
  5. To allow non-professional end-users to develop their own solutions.
  6. To generate bug-free codes from high-level expressions of requirements.
Examples of 4GLs are:
  • Visual Basic
  • Delphi Pascal
  • Visual COBOL (Object COBOL)
  • Access Basic

​Advantages of fourth generation languages.

  1. They are user-based, and therefore, easy to learn & understand.
  2. The grammar of 4GL’s is very close to the natural English language.  It uses menus & prompts to guide a non-specialist to retrieve data with ease.
  3. Very little training is required in order to develop & use 4GL programs.
  4. They provide features for formatting of input, processing, & instant reporting.

FIFTH GENERATION LANGUAGES (5GL’S).


The 5GL’s are designed to make a computer solve a problem by portraying human-like intelligence.

The languages are able to make a computer solve a problem for the programmer; hence, he/she does not spend a lot of time in coming up with the solution.  The programmer only thinks about what problem needs to be solved and what conditions need to be met without worrying about how to implement an algorithm to solve the problem.

5GLs are mostly used in artificial intelligence.

Examples of 5GLs are:


  • PROLOG
  • LISP
  • Mercury
  • OCCAM.

  1. LISP (LISt Processing)

    In LISP, both programs & data are arranged (structured) as lists.
    It is used in artificial intelligence.  However, it is not suitable for commercial data processing applications.
  2. PROLOG (PROgramming in LOGic)

    PROLOG was developed from LISP by the Japanese.  
    It is designed for use with Expert systems & Artificial Intelligence.  It is mostly used for solving problems, which involve objects and relationships between objects.
    Like LISP, it is not suitable for commercial data processing applications.

OBJECT-ORIENTED PROGRAMMING LANGUAGES (OOPs)

  • Object-Oriented Programming is a new approach to software development in which data & procedures that operate on data are combined into one object.
  • OOPs use objects.  An Object is a representation of a software entity such as a user-defined window or variable.  Each object has specific data values that are unique to it (called state) and a set of the things it can accomplish called (functions or behaviour).
  • Several objects can be linked together to form a complete program.  Programs send messages to an object to perform a procedure that is already embedded in it.  This process of having data and functions that operate on the data within an object is called encapsulation.
  • The data structure & behaviour of an object is specified/described by a template (called a class).  Classes are hierarchical, and it is possible to pass the data & behaviour of an object in one class down the hierarchy.
  • Object-Oriented programming enables rapid program development.  Every object has properties such as colour, size, data source, etc, which can be set easily without much effort.  In addition, every object has events associated with it that can be used to trigger certain actions, e.g. remove the window from the screen on clicking the ‘Close’ button.
  • OOP has contributed greatly to the development of graphical user interface operating systems and application programs.

Examples of Object-oriented programming languages are: -
  • Simula
  • C++
  • SmallTalk
  • Java
Java is sometimes associated with development of websites, but it can be used to create whole application programs that do not need a web browser to run.

JAVA

  • Java is an OOP language that resembles Object C (a simplified form of C++).
  • The code of Java displays graphics, accesses the network, and interfaces with users via a set of capabilities known as classes.  Classes define similar states & common methods for the behavior of an object.
  • JAVA programs are not compiled into machine code; instead, they are converted into a collection of bytes that represent the code for an abstract Java Virtual machine (VM).  A Java interpreter running on a physical machine is then used to translate those bytes into local actions, such as printing a string or drawing a button.

WEB SCRIPTING LANGUAGES.

  • Web scripting languages are mostly used to create or add functionalities on web pages.
  • Web pages are used for creating Web sites on the Internet where all sorts of advertising can be done.
  • Web pages are hypertext (plain-text) documents written using a language called HyperText Markup Language (HTML).  HTML documents have a file extension of .Html or .Htm.
  • Note.  HTML doesn’t have the declaration part and control structures, and has many limitations.  Therefore, to develop functional websites, it must be used together with other web scripting languages like JavaScript, VBScript and Hypertext Preprocessor.

Comparison of Programming languages.

​Machine language

  1. Instruction set is made up of binary digits (0’s & 1’s).
  2. Instruction is made of 2 parts: operation code & operand.
  3. No translation is needed.  (This is the computer language; hence, the computer understands it directly).
  4. Executed by the hardware directly & is faster.
  5. Difficult to learn, develop & maintain.
  6. Programs are lengthy & tedious.
  7. It is time-consuming to develop machine code programs.
  8. Used in applications where efficient use of the CPU time is necessary, e.g., developing Operating systems & other Control programs that coordinate the working of peripherals.

​Assembly language

  1. Instruction set is made up of Mnemonics & labels.
  2. Instruction is made up of 2 parts: operation code & operand, but comments can be added.
  3. Uses an Assembler to convert the assembly language source codes to their object code equivalents
  4. Executed faster than High-level, but slower than the machine code programs.
  5. It’s easier to learn, develop & maintain as compared to machine code programs.
  6. Like machine code language, the programs are lengthy & tedious.
  7. They take a shorter time to develop as compared to machine code programs, but take longer than High-level language programs.
  8. Like machine language, Assembly language programs are used in applications where efficient use of the CPU time is necessary.

​High-level languages

  1. Instruction set is similar to English language statements & mathematical operators.
  2. The instruction varies depending on the particular language.
  3. Uses compiler or interpreter - Compiler translates all the source code at once into object code; Interpreter translates line by line.
  4. Translation & execution is very slow.
  5. Easy to learn, develop, maintain and use.
  6. Programs are shorter & simpler than Machine & assembly lang. programs.
  7. Developing High-level language programs takes very short time.
  8. Most High-level languages are general-purpose, & can be used to do almost all computer-processing tasks.

​Factors to consider when choosing a Programming language.

The following factors should be considered when choosing a Programming language to use in solving a problem:
  1. The availability of the relevant translator
  2. Whether the programmer is familiar with the language
  3. Ease of learning and use
  4. Purpose of the program,
    i.e., application areas such as education, business, scientific, etc.
  5. Execution time
    Applications that require quick response are best programmed in machine code or assembly language.  High-level languages are not suitable for such application because, they take long to be translated & executed. 
  6. Development time
    Development time is the time a programmer takes to write and run a program. - High-level languages are easy to read, understand and develop; hence, they require less development time.  Machine code & Assembly languages are relatively difficult to read, understand and develop; hence, they are time-consuming.
  7. Popularity
    The language selected should be suitable and/or successful in the market with respect to the problems to be solved.
  8. Documentation
    It should have accompanying documentation (descriptions) on how to use the language or maintain the programs written in the language.
  9. Maintenance
    Programs are developed to solve specific problems, and the problems keep on changing; hence, the programs are also changed to perform the new functions. Program maintenance is the activity of incorporating more routines onto the program, modifying the existing routines or removing the obsolete routines to make the program adapt to a functionally enhanced environment. The maintenance is made easier if the language used is easy to read and understand.
  10. Availability of skilled programmers
    The language selected should have a pool of readily available programmers to ease the programming activity, and reduce development time.

​Review Questions

  1. (a). What is a Programming language?
    (b). Explain the two levels of programming languages.
  2. (a). What is meant by ‘Machine language’?
    (b). Explain why machine language programming is so error-prone.
    (c). Show the difference between Machine language and Assembly language.
    (d). Give two advantages & three disadvantages of Machine language programming.
  3. (a). What are High-level languages?
    (b). Give the features/characteristics of high-level programming languages.
    (c). Describe briefly how a program written in high-level programming language becomes a machine code program ready for operational use.
    (d). Explain the advantages and disadvantages of using a High-level programming language for writing a program.
    (e). List four examples of high-level programming languages.  Indicate the application of each language in computing.
  4. (a). What is meant by program portability?
    (b). Why are low-level languages not considered to be portable?
  5. List 8 factors that need to be considered when selecting a programming language.



Read More
0 Comments
Print Friendly and PDF

Definition of Programming

18/11/2021

0 Comments

 

​Definition of Programming

​​Computer Program:

A computer program is a set of coded instructions given to the computer, and represents a logical solution to a problem.  It directs a computer in performing various operations/tasks on the data supplied to it.

Computer programs may be written by the hardware manufacturers, Software houses, or a programmer to solve user problems on the computer.


​Programming:

​Programming is the process of designing a set of instructions (computer programs) which can be used to perform a particular task or solve a specific problem.

It involves use of special characters, signs and symbols found in a particular programming language to create computer instructions.

The programming process is quite extensive.  It includes analyzing of an application, designing of a solution, coding for the processor, testing to produce an operating program, and development of other procedures to make the system function.

The program created must specify in detail the logical steps to be taken & the method of processing the data input into the computer in order to carry out the specified task.
A computer program performs the following:
  1. Accepts data from outside the computer as its input.
  2. Carries out a set of processes on the data within the computer memory.
  3. Presents the results of this processing as its output, and
  4. Stores the data for future use.

​Programming Languages:

​A programming language is a set of symbols (a language) which a computer programmer uses to solve a given problem using a computer.

The computer must be able to translate these instructions into machine-readable form when arranged in a particular sequence or order.



Read More
0 Comments
Print Friendly and PDF

List four areas that would be considered in the requirement specification.

18/11/2021

0 Comments

 

​(a) List and describe four strategies for converting from an old system to a new system.  (4mks)

  • Direct approach
    user simply stops using old system and starts using the new one
  • Parallel approach
    old and new system are operated side by side until the new system has shown it is reliable
  • Phased approach
    parts of a new system are phased in separately either at different times or all at one in groups 
  • Pilot approach
    entire system is tried out but only by some users

(b) (i) Distinguish between private data and confidential data  (2mks)

  • Private data
    belongs to an individual and must be accessed through direct permission from the owner
  • Confidential data
    ​held by government or organization about people but can be seen by authorized people only.

(ii) What can be done to stop illegal access to a computer laboratory by unauthorized people  (3mks)

  1. fit strong metallic grills and locks to doors 
  2. don’t welcome strangers into the lab
  3. install alarms
  4. employ guards
  5. burglar proof

​(c) (i) List four areas that would be considered in the requirement specification. (4mks)

  1. output specification
  2. in put specification
  3. file /data/tables
  4. hard ware/soft ware

​(ii) Name any two areas covered in feasibility report during system analysis and design. (2mks)

  • Lost benefit analyst
  • Schedule                   
  • Users
  • Environment           
  • Technology



Read More
0 Comments
Print Friendly and PDF

Describe three methods you would use in error detection during program testing

16/11/2021

0 Comments

 

(a)When invoicing customers, the invoice clerk has to work out the discounts allowable on each order. Any order over 20,000/= attracts a “bulk” discount of 7%. A customer within the trade is allowed 10%. There is also a special discount of 2% allowed for any customer who has been ordering regularly for over 2 years. Using a flowchart show clerical procedure for working out discount entitlement.

When invoicing customers, the invoice clerk has to work out the discounts allowable on each order. Any order over 20,000/= attracts a “bulk” discount of 7%. A customer within the trade is allowed 10%. There is also a special discount of 2% allowed for any customer who has been ordering regularly for over 2 years. Using a flowchart show clerical procedure for working out discount entitlement.

(b) Name the control structures you have used in the flow chart  (2mks)

  1. selection
  2. sequence

Describe three methods you would use in error detection during program testing

error detection methods
  • desk checking (dry-run)
    going through the program while still on paper 
  • using debugging utilities
    enter the program editor where syntax  errors are detected during translation
  • using test date
    ​carries out trial runs
  • various data variations and extreme including good and bad data are entered to see how the program would handle them

Read More
0 Comments
Print Friendly and PDF

List four stages in data collection. What is meant by reference and report file

16/11/2021

0 Comments

 

​(a) List four stages in data collection.             (2mks)

  1. creation
  2. transmission
  3. preparation
  4. media conversion
  5. input validation
  6. sorting

​(b) What is meant by the following             (2mks)
(i) Reference file

​used for reference or lookup purposes that is required during processing

​(ii) Report file

​used to store permanent records extracted from the master file or generated after  processing operation

Read More
0 Comments
Print Friendly and PDF

Write an algorithm to computer the area of a circle.

15/11/2021

0 Comments

 

Write an algorithm to computer the area of a circle. (2mks)

Pseudocode

Start
input
pie = 3.14
area = pie*r*r
print area
​end

Start
input
area = 3.14 *r*r
print r, area
​stop



Flowchart

Write an algorithm to computer the area of a circle.
flowchart

Read More
0 Comments
Print Friendly and PDF

Perform the following binary addition, subtraction and conversion to octal

13/11/2021

0 Comments

 

​(a) Subtract 1102 from 110102                (1mk)

Picture

(b) Find the sum of binary number 101.1012 and 110.1002             (1mk)

Picture

(c) Convert binary number 11010110.10012 into octal number.              (1mk)

Picture

Read More
0 Comments
Print Friendly and PDF

​List and describe three guidelines that should be followed when conducting an interview during information gathering

12/11/2021

0 Comments

 

​List and describe three guidelines that should be followed when conducting an interview during information gathering     (3mks)

  1. be careful about body language, sitting arrangement, closeness etc.
  2. avoid personal biases in your questions and perceptions;
  3. interviewee must be informed in good time and topic communicated earlier.

Read More
0 Comments
Print Friendly and PDF

Explain three functions of an information system in an organisation.

15/1/2021

0 Comments

 


Explain three functions of an information system in an organisation.

​(b) Explain two benefits that a company would gain from using batch processing method for data processing 
(c) (i) Convert the number 11101.1 12 to its decimal equivalent.
(ii) Perform the following binary operation 110112 + 1012
RESPONSES
a) Functions of information system in an organization.
  •  Process data in an organization according to the policies and objectives.
  •  Decision making by providing information that helps with strategic planning within the organization.
  •  Means of communication and flow of information to various sections of an organization / enable sharing of information.
  •  Improving quality of production, through the use of feedback mechanisms for counter checking the production with expected results.
(b)Benefits of using batch processing.
  •  Output is increased because the processor work is uninterrupted.
  •  Low cost of operation since the tasks are processed as a group.
  •  Requires little supervision since the processing runs automatically as long as the instructions is given.
  •  Less labour required since the process is automatic.
  • Efficient use of computer resources due to no idle time.
  •  Gives company opportunity to check any error before processing begins.
(c) (i) Convert the number 11101.1 12 to its decimal equivalent. (ii) Perform the following binary operation 110112 + 1012

Read More
0 Comments
Print Friendly and PDF
<<Previous
    COMPUTER STUDIES QUESTIONS AND ANSWERS

    Categories

    All
    1998
    1999
    2000
    2001
    2002
    2003
    2004
    2005
    2006
    2007
    2008
    2009
    2010
    2011
    2012
    2013
    2014
    2015
    2016
    2017
    2018
    2019
    2020
    Analogue And Digital Systems
    Applications Areas Of Ict
    Areas-where-computers-are-used
    Auxiliary Storage Devices
    Basic-computer-set-up-and-cabling
    Binary Addition
    Binary Subtraction
    Career Opportunities In ICT
    Classification Of Computers
    Classification-of-computers
    Coaxial Cables
    COMPACT DISK
    COMPLETE PAPERS
    Computer Crimes
    Computer-files
    Computer Memory
    Computer Software
    Computer Systems
    COMPUTER VIRUS
    Dashboard
    Database
    Data Collection
    Data Communication
    Data-integrity
    Data Processing
    Data Representation In A Computer
    Data Security And Controls
    Definition And Development Of Algorithm
    Definition-of-a-computer
    Desktop Publisher
    Development-of-computers
    DTP
    DVD
    Editing-and-formatting-a-word-document
    Electronic Data Processing Modes
    Elementary Programming Principles
    Errors-in-data-processing
    Evolution-of-computer-systems
    Fibre Optic Cables
    File Management Using An Operating System
    File-organization-methods
    Flowchart
    Form 1 Level
    Form 2 Level
    Form 3 Level
    Form 3 Mock Exams
    Form 4 Level
    Hands On Skills
    HARDCOPY OUTPUT DEVICES
    Hardware
    Impact Of Ict On Society
    IMPACT PRINTERS
    Information
    Input Devices
    Internet And Email
    Introduction To Computers
    Introduction To Networking And Data Communication
    ISP
    Levels-of-programming-languages
    Midterm-exams
    Mind-blowing-q-a
    Mocks
    Network-topology
    NON-IMPACT PRINTERS
    Octal
    Operating Systems
    Output Devices
    Paper 1
    Parts-of-a-computer
    PRINTERS
    Processing-devices
    Processors
    Program-construction
    Program-control-structures
    Program-design
    Program-development
    Program-documentation
    Protocols
    Registers
    Review Questions
    Revision-kits
    Secondary Storage Media
    Section A
    Section B
    Security Threats And Control Measures
    Software
    Spreadsheets
    Stages Of System Development
    Storage Devices
    Symbolic-representation
    System-design
    System Development
    System-documentation
    Term-1
    The Computer Laboratory
    The-cpu
    The Keyboard
    Types Of Computer Files
    Types-of-networks
    User Interface
    Uses-of-computers
    Word Processors
    Worksheet-formatting

    Archives

    December 2024
    April 2022
    January 2022
    December 2021
    November 2021
    July 2021
    March 2021
    February 2021
    January 2021
    December 2020
    October 2020
    April 2020
    February 2020
    October 2019
    August 2019
    July 2019
    April 2019
    March 2019
    November 2018
    August 2018
    July 2018
    December 2017
    November 2017
    October 2017
    July 2017
    August 2016
    June 2016
    January 2016
    December 2015
    November 2015

    RSS Feed

ADS KEEPER HEADER
Print Friendly and PDF

Primary Resources
  • K.C.P.E Past Papers
  • ​Pri - Primary 1 Level
  • Pri  - Primary 2 Level
  • Grade 1
  • Grade 2
  • Grade 3
  • Grade 4
  • Standard 5
  • Standard 6
  • Standard 7
  • Standard 8
  • English
  • Kiswahili
  • Social Studies
  • Science
  • Mathematics
  • Kenya Sign Language
  • I.R.E
  • ​H.R.E
  • Notes
  • Termly Questions
  • Mocks
  • K.C.P.E Past Papers
College Resources
  • E.C.D.E
  • P.T.E
  • D.T.E
  • Technical Diploma
  • Technical Certificate
  • Business Diploma
  • Business Certificate
  • Higher Diploma
  • K.A.S.N.E.B Resources
  • K.M.T.C Resources
  • Varsity Resources
Secondary Resources
  • K.C.S.E Past Papers
  • Form 1
  • Form 2
  • Form 3
  • Form 4
  • Term 1
  • Term 2
  • Term 3
  • English
  • Geography
  • History
  • C.R.E
  • I.R.E
  • ​H.R.E
  • Home Science
  • Computer Studies
  • Business Studies
  • Agriculture
  • Chemistry
  • Biology
  • Physics
  • Mathematics ALT A
  • Mathematics ALT B
  • Kiswahili
  • French
  • Germany
  • Arabic
  • Aviation
  • Art & Design
  • Drawing & Design
  • Building & Construction
  • Metal Works
  • Wood Work
  • Music
  • Kenya Sign Language
  • Electricity
Other Useful Links
  • Academic Environment
  • How its Done
  • News and Opinions
  • Manyam Franchise Support
  • About
  • SITEMAP
  • FOCUS A365 SERIES
  • Membership Details (KCPE/KCSE)
  • Secondary Mocks
  • SYLLABUS
Contact Us
Manyam Franchise
P.O Box 1189 - 40200 Kisii
Tel: 0728 450 424
Tel: 0738 619 279
Tel: 0763 450 425
E-mail - sales@manyamfranchise.com
Photos used under Creative Commons from wwarby, JoshMacDonald, Visual Content, wuestenigel, Homini:), Wonderlane, Mike Licht, NotionsCapital.com, The Official CTBTO Photostream, Nabor Garrido, picsaf.com, OER Africa, Jemimus, andronicusmax, Christoph Scholz, cyanocorax, matsuyuki, Mark Hodson Photos, cathyse97, tompagenet, ToGa Wanderings, crstnksslr, machernucha, panpot, ePublicist
  • Home
    • JOBS IN KENYA AND ABROAD FOR KENYANS AND BEYOND
    • How its Done
    • KNEC Portal
    • Atika School Advanced Search
    • News and Opinions
    • Academic Environment
    • KNEC KCSE PROJECT INSTRUCTIONS
    • SITEMAP
    • About Us? >
      • About Us
      • Learn more about us
  • OUR PRODUCTS
    • All Categories >
      • Category
      • FREE NOVELS >
        • COURSE BOOKS
        • KCSE KISWAHILI SETBOOKS
        • Backed Up Files and Archives
        • FREE DOCUMENTS
        • PRIMARY 8-4-4 BASED RESOURCES
        • STANDARD 8 RESOURCES
        • HIGH SCHOOL RESOURCES >
          • Biology Paper 3 Exams
          • Secondary Examinations
        • PRIMARY CBC BASED RESOURCES
        • COLLEGE & VARSITY RESOURCES
    • PRIMARY RESOURCES CBC
    • PRIMARY RESOURCES 8-4-4
    • SECONDARY RESOURCES
    • NOTES & TUTORIALS
    • COLLEGE RESOURCES
    • NOVELS and OTHER BOOKS
  • EXAMINATIONS
    • PRIMARY EXAMS >
      • Primary Assignments and Random Exams
      • CBC
      • 8-4-4
      • STANDARD 8 PAST PAPERS 8-4-4 BASED
    • MOCKS AND JOINT EXAMS >
      • FORM 1 QUESTION PAPERS, ANSWERS AND MARKING SCHEMES COLLECTIONS
      • FORM 2 QUESTION PAPERS, ANSWERS AND MARKING SCHEMES COLLECTIONS
      • FORM 3 EXAMINATIONS, QUESTION PAPERS AND ANSWERS
      • MOCKS PAST EXAMS BY REGION
    • KCPE >
      • KCPE BY YEAR >
        • KCPE 2020 RESULTS, REPORTS, QUESTIONS AND ANSWERS
        • KCPE PAST PAPERS 2019 REPORTS, RESULTS, QUESTIONS AND ANSWERS
      • KCPE PAST PAPERS PER SUBJECT
      • KCPE PAST PAPERS AND ANSWERS
      • KCPE MATHEMATICS TOPICAL QUESTIONS FROM 1989 TO LAST YEAR
    • KCSE >
      • KCSE BY YEAR >
        • KNEC KCSE PAST PAPERS, MARKING SCHEMES, QUESTIONS & ANSWERS
      • KCSE BY SUBJECT >
        • KCSE PAST PAPERS BY SUBJECT
        • Free KCSE Past Papers Mathematics
        • Free KCSE Biology Questions and Answers
    • QUESTIONS & ANSWERS >
      • SECONDARY >
        • LANGUAGES >
          • A DOLL'S HOUSE BY HENRIK IBSEN RESOURCES
        • TECHNICALS >
          • COMPUTER STUDIES >
            • COMPUTER STUDIES Q & A
            • kcse computer studies paper 2 AND 3 Questions & Answers
          • BUSINESS STUDIES QUESTIONS & ANSWERS
          • KCSE AGRICULTURE TOPICAL QUESTIONS AND ANSWERS
          • KCSE HOME SCIENCE DIRECT QUESTIONS AND ANSWERS
        • SCIENCES >
          • KCSE Mathematics Topical Questions
          • KCSE Biology Topical Questions and Answers
          • CHEMISTRY TOPICAL QUESTIONS AND ANSWERS
          • KCSE Physics Topical Questions
          • KCSE physics Practical Sample Quiz
        • HUMANITIES >
          • ISLAMIC RELIGIOUS EDUCATION (IRE) QUESTIONS AND ANSWERS
          • KCSE History Topical Questions and Answers
          • GEOGRAPHY TOPICAL QUESTIONS AND ANSWERS
      • PRIMARY >
        • Standard 4-8 Mathematics Topical Questions from Mocks and KCPE
        • Std 6 Mathematics Notes
  • TUTORIALS
    • SECONDARY >
      • SCIENCES >
        • FOCUS MATHEMATICS TUTORIALS AND EXAMS FREE
        • KCSE BIOLOGY NOTES
        • FREE KCSE CHEMISTRY NOTES
        • KCSE PHYSICS NOTES, AUDIOVISUALS AND MORE
      • LANGUAGES >
        • ENGLISH >
          • English KCSE Set Books
          • ENGLISH POETRY QUESTIONS WITH ANSWERS FOR K.C.S.E CANDIDATES
          • ENGLISH GRAMMAR #KCSE
        • CHOZI LA HERI - MWONGOZO
        • KIGOGO - MWONGOZO
        • USHAIRI MASWALI NA MAJIBU
        • MASWALI NA MAJIBU YA TUMBO LISILOSHIBA
        • KCSE Kiswahili Fasihi
      • TECHNICALS >
        • HOME SCIENCE NOTES
        • KCSE BUSINESS STUDIES NOTES
        • COMPUTER STUDIES NOTES LATEST
        • kcse Computer Studies Notes
        • KCSE AGRICULTURE NOTES, SYLLABUS, QUESTIONS, ANSWERS, SCHEMES OF WORK AND OTHERS
      • HUMANITIES >
        • KCSE History Notes Form 1 to 4
        • FREE KCSE CRE NOTES
        • KCSE GEOGRAPHY NOTES
        • IRE NOTES, AUDIOVISUAL, QUESTIONS AND ANSWERS
    • PRIMARY >
      • NOTES >
        • KISWAHILI
        • SOCIAL STUDIES >
          • STANDARD 4: SOCIAL STUDIES
        • SCIENCE
        • ENGLISH >
          • KCPE and Primary Level Compositions
        • MATHEMATICS >
          • KCPE Mathematics Notes
      • EXAMINATIONS >
        • DecaTurbo Online Series Examinations
        • CBC Kiswahili
        • FOCUS A365 SERIES K.C.P.E EXAMINATIONS FOR PRIMARY
        • Standard 8 (std) English Topical Questions
    • Other Supportive Documents >
      • Free Schemes of Work
      • SYLLABUS >
        • Primary 8-4-4 based Syllabus, Objectives and Lessons
        • Primary Mathematics Syllabus
      • MASOMO VIDEOS
  • CURRICULUM
    • NEW CURRICULUM DESIGNS >
      • PRIMARY >
        • PRE PRIMARY ONE CURRICULUM WITH SYLLABUS
        • PRE PRIMARY TWO CURRICULUM WITH SYLLABUS
      • SECONDARY >
        • KNEC KCSE SYLLABUS AND COURSE OUTLINES
      • COLLEGE >
        • Regulations for the TIVET Craft and Diploma Business Examinations
  • HIGH INSTITUTIONS
    • EXAMINATIONS >
      • College and Varsity Past Papers online
    • TUTORIALS >
      • COLLEGE AND UNIVERSITY NOTES AND TUTORIALS
  • CUSTOMER CARE
    • PRICING
    • Contact
    • Help & Support
    • DONATE
    • MPESA FORM
  • BLOGS
    • ENGLISH - EKEGUSII DICTIONARY
  • MEMBERSHIP RESOURCES
    • Assignments and Random Exams
    • TERM 3 2021 PRIMARY PAST REVISION PAPERS
    • SECONDARY EXAMINATIONS
    • Search Free Documents (PDF)
  • Archived Pages
    • C.R.E (CRE) QUESTION AND ANSWERS
    • TOP SECONDARY EXAMS ALL SUBJECTS