0% found this document useful (0 votes)
223 views

Computer Programming Language

The document outlines a second term scheme of work for a computer programming course. It includes topics like revision of computer programming languages, Basic language, simple Basic statements, graphic packages 1 and 2, ICT as a transformation tool, benefits of ICT, ICT gadgets, and revision/examination. Under computer programming language, it discusses what a programming language is, levels of programming languages including machine language, low-level language, and high-level language. It also provides examples of popular high-level languages like BASIC, C, C++, COBOL, FORTRAN, Pascal, and Ada. Under Basic language, it discusses what BASIC stands for, versions of BASIC, rules for BASIC programming
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
223 views

Computer Programming Language

The document outlines a second term scheme of work for a computer programming course. It includes topics like revision of computer programming languages, Basic language, simple Basic statements, graphic packages 1 and 2, ICT as a transformation tool, benefits of ICT, ICT gadgets, and revision/examination. Under computer programming language, it discusses what a programming language is, levels of programming languages including machine language, low-level language, and high-level language. It also provides examples of popular high-level languages like BASIC, C, C++, COBOL, FORTRAN, Pascal, and Ada. Under Basic language, it discusses what BASIC stands for, versions of BASIC, rules for BASIC programming
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

SECOND TERM SCHEME OF WORK

1. REVISION / COMPUTER PROGRAMMING LANGUAGE


2. BASIC LANGUAGE
3. SIMPLE BASIC STATEMENTS
4. GRAPHIC PACKAGE I
5. FEATURES OF GRAPHIC PACKAGE
6. GRAPHIC PACKAGE II
7. ICT AS A TRANSFORMATION TOOL
8. ICT AS A TRANSFORMATION TOOL
9. BENEFITS OF ICT
10. ICT GADGETS
11. REVISION
12. EXAMINATION

COMPUTER PROGRAMMING LANGUAGE

A programming language is a vocabulary and set of grammatical rules for instructing a computer to perform specific
tasks. It can also be defined as a coded language used by programmers to write instructions that a computer can
understand to do what the programmer wants.

A program is a collection of instructions that performs a specific task when executed by a computer. The physical
can computer machinery that executes the instructions is the hardware.

A computer programmer, programmer, developer, coder or software engineer is a person who writes computer
software. They are also individual that compose instructions for the computer system to refer to when performing
a given action.

The term programming language usually refers to high level languages such as

 BASIC (an acronym for Beginner’s All Purpose Symbolic Instruction code) is a family of general purpose, high
level programming languages that was designed by John Gorge Kemeny and Thomas Eugene Kurtz in 1964.
 C programming language was developed by Dennis Ritchie in 1972.
 C++ programming language was developed by Bjarne Stroustrup
 COBOL (an acronym for Common Business Oriented Language). COBOL was designed in 1959 by CODASYL (an
acronym for Conference/Committee on Data Systems Languages) and was partly based on previous
programming language design work by Grace Hopper, commonly referred to as the (grand) mother of COBOL.
 FORTRAN (derived from formula translators). It was designed by a team of programmers and was first
published in 1957. The versions of FORTRAN listed by the American National Standards Association (ANSA) are:
- FORTRAN 66 (FORTRAN IV) in 1966, FORTRAN 77 in 1978, FORTRAN 90 in 1990, FORTRAN 95, and FORTRAN
2003.
 Pascal Programming language was designed by Nicklaus Wirth in 1968-1969 and published in 1970.
 Ada programming language. Ada was originally designed by a team led by John Ichbiah of a Honeywell and was
named after Ada Lovelace (1815-1852) who is credited with being the first computer programmer. Examples
include Java, Perl, and Algol etc.

LEVELS OF PROGRAMMING LANGUAGE


1. MACHINE LANGUAGE (ML)
The computer system only understands the machine language (ML) which is impossible for humans because
they are written in binary code (consisting entirely of numbers i.e 11000). Machine language uses the
representation of zero (0) and one (1) to denote OFF and ON electrical symbols.

FEATURES OF MACHINE LANGUAGE


 It is the machine language or machine dependent
 Consumes less space by computer memory unlike high level language
 It is written in 0’s and 1’s.
 It is very difficult to write and modify.

2. LOW LEVEL LANGUAGE (LLL)


Assembly Languages (AL) was introduced to ease the difficulty in programming in ML. AL uses mnemonics to
represent operations to be performed by the computer and symbols to represent data. To do that, AL requires
a translator called an Assembler to translate AL to ML for the computer to understand. ML and AL is machine
dependent and they are both referred to as Low Level Languages (LLL).

FEATURES OF LOW LEVEL LANGUAGE


 Machine dependent.
 Synthetic code is used e.g. HLT for HALT
 Mnemonic codes are used in place of actual machine.

3. HIGH LEVEL LANGUAGE (HLL)


In other to simplify computer programming, programming languages that resembles human language were
developed. These languages are called High Level Languages (HLL). Examples are Ada, Pascal, FORTRAN, C, C ++,
COBOL and BASIC e.t.c.
FEATURES OF HIGH LEVEL LANGUAGE

 It is machine independent
 It consists of series of instruction codes.
 You must adhere to some rules while writing the high-level languages.
 It is easy to read and understand.
 They are problem oriented.

COMPARISON OF LEVELS OF PROGRAMMING LANGUAGES

S/N MACHINE LANG. LOW LEVEL LANG. HIGH LEVEL LANG.


1. Machine dependent Machine dependent Machine independent
2. It is written in 0’s & 1’s Mnemonic code is used. It consist series of instruction
code.
3. Difficult to write and Less difficult to write and Easy to write, read and
modify. modify. modify.
4. Consumes much memory Consumes less memory space Does not consume memory
space. compared with machine space.
language.

MEANING OF BASIC
BASIC stands for Beginner All-purpose Symbolic Instruction Code. It is not only simple but also a very
powerful high level programming language. It consists of statements written in English words and
mathematical notation. It is written in a human understandable form.
The two professors, John G. Kemeny and Thomas E. Kurtz developed the language in 1964 at Dartmouth
College, USA, as means of teaching students a simple language for programming a computer.

VERSIONS OF BASIC
i. QBASIC ii. T.BASIC iii. V.BASIC iv. GWBASIC v. Apple Soft BASIC
vi. BASICA – (BASIC ADVANCE)

Rules for BASIC Programming


1. All expressions must be written in capital letters.
2. First character must be alphabet
3. BASIC statement or keyword must start with a line number.
4. Each line must contain only one BASIC program statement.
5. There must not be full stop at the end of a statement.
6. The start/begin statement must be the first entry in a program.
7. End/Stop statement must be the last entry in a program.

BASIC Statements

LET Statement
The LET statement permits the programmer to assign numbers and formulas to a variable name.

Example: 10 LET AREA = ½ (b*h)


20 LET JS = How do you do”
30 LET ANN = 50

DATA Statement
The statement (Read and Data) goes hand in hand. Data statement is used to enter data into a program
before running the program or before program execution occurs. The data to be entered into the
program is read from DATA statement.
E.g. 10 READ A, B, C, D
20 DATA 3, 5, 10, 15

INPUT Statement
This allows you to type in data from the keyboard while the program is running. This program will be able
to produce the required result with given data. The input statements have the general format.
10 INPUT A
20 INPUT B
30 INPUT C

Example: 10 INPUT “YOUR NAME” =$


10 INPUT “YOURSURNAME”, =$

PROGRAM TERMINATOR (END, STOP)


END Statement: this always indicates the end of a BASIC program. When the computer comes across the
end statement in a program, the computer automatically ends. End should always be the last statement
in the program to indicate the physical end of the program.
STOP indicates when the logical executions of a program should cease.
Example: 40 STOP
40 END

OUTPUT or PRINT Statement


The result of the processed data is displayed by output statement. The PRINT statement: brings out the
processed data. The print statement has the general format.
Example: 20 PRINT D, E, C OR
20 PRINT A, $, C

IF …THEN … ELSE:
Used to perform comparisons or make decision.

FOR …TO... NEXT:


Repeat a section of code a given number of times. A variable that acts as a counter is available within the
loop.

DO…LOOP {WHILE} OR {UNTIL}: Repeat a section of code Forever or while/until the specified condition is
true.

GOTO: Jumps to a numbered or labeled line in the program.

GOSUB: Temporarily jumps to a numbered or labeled line, returning to the following line after
encountering the RETURN command. This is used to implement subroutines.

CLS Statement: This program when executed will clear the screen. It means Clear the Screen

REM Statement (Remark)


REM statements stand for Remark. The statement allows you to add comment and explanatory notes to
your program. This may as well include date and what the program is all about. Computer does not
execute REM; it is just a remark that aids the programmer to remember certain thing about the program.
Examples: REM PROGRAMM TO SAY HELLO
REM TO CALCULATE AREA OF A TRIANGLE

LINE numbers
In BASIC we need a line number for each basic statement. Numbers are positive whole numbers from 1 to
99,999. A line number is always in integer form and this are done to give room for correction when
necessary. It is presented in the format below:
10 ……………………..
20 ……………………..
30 ……………………..
40 …………………….. etc.

Simple BASIC Program


Example 1: Write a BASIC program to find the average of three numbers.
Solution:
5 REM FIND AVERAGE
10 READ A
15 READ B
20 READ C
25 SUM=A+B+C
30 AVE=SUM/3
35 PRINT AVE
40 DATA 5, 10, 15
45 END

Example 2: Write a BASIC program to calculate the volume of a box.


Solution:
10 REM FIND THE VOLUME OF A BOX
20 READ L,B,H
30 READ V=L*B*H
40 DATA 3,5,10
50 PRINT VOLUME
60 END

Example 3
Write a basic program to calculate and print the sum of two numbers.

10 REM PROGRAM TO CALCULATE AND PRINT THE SUM OF TWO NUMBERS


20 REM FIRST NUMBER = F1
30 REM SECOND NUMBER = F2
40 REM ADDITION OF ALL NUMBERS=SUM
50 CLS
60 INPUT “ENTER FIRST NUMBER” F1
70 INPUT “ENTER SECOND NUMBER” F2
80 SUM = F1+F2
90 PRINT “ANSWER =”,SUM
100 END

SUB-TOPIC 2: ICT Based Gadgets

Meaning of Gadgets: Gadgets are tools or machines that help to do something. ICT gadgets are
information and communication equipments, which includes computer hardware i.e. printer, etc.
Broadcasting technology i.e. radio, television, other ICT gadgets are ATM, fax machines, mobile phones
etc. ICT gadgets are further explained below;
 Mobile Phones: It is an electronic handheld device used to make mobile telephone calls. Common
manufacturers of mobile phones are Nokia, Samsung, and Blackberry e.t.c.
 Computer: It is an electronic device for storing and processing data. Computers come in various types which
include Personal Computer (PC), Laptops and Ipad.
 Fax Machine: Fax stands for facsimile i.e make a copy. It is a device that can send or receive pictures and text
over a telephone line.
 Automated Teller Machine (ATM): ATM commonly called ‘Cash Point’ is a computerized device that provides
the clients of financial institutions access to financial transaction in public space without the need of a cashier,
human clerk or bank teller.
 Dispensing Machines (a Vending Machine): It is a machine that dispenses items such as snacks, beverages,
lottery, tickets e.t.c to customers automatically.
 Point of Sale Machine or Automated Cash Register (ACR): It is a machine that is used to carry out retail
transactions. It can provide many services such as credit card processing and cash transaction e.t.c
 Radio Sets: It is an electronic receiver that detects, demodulates and amplifies transmitted signals.
 Television Sets: It is a device used to view television broadcast. Modern television consists of a display, antenna
or radio frequency, input and a tuner.
 Satellites: This is an information transmission method through cables or wireless by the use of
satellites dishes.
 VSAT: This is advanced telecom equipment for receiving digital broadcast. It stands for very small
aperture terminal (VSAT).

You might also like