# Lesson Notes By Weeks and Term - Senior Secondary School 2

Introduction to Basic programming

CLASS: SSS 2

SUBJECT: DATA PROCESSING

TERM: 2ND TERM

WEEK 9                                                                                              Date…………………..

TOPIC: INTRODUCTION TO BASIC PROGRAMMING

BASIC stands for BEGINNNERS ALL-PURPOSE SYMBOLIC INSTRUCTION CODE. It is a single easy to use language designed also for beginners. It is not only simple but also powerful. It is science oriented. Professor John Kemeny and Thomas Kurtz developed the language in 1964 at Dartmouth College, U.S.A., as a means of teaching students a simple language for programming a computer. The program can be used to solve problem covering a wide range of application on many different types of digital computer. Because the BASIC Language has been designed for ease of use and is readily available on most computers, program development can be achieved in minimum time.

There are different versions of Basic. They include:

• Turbo Basic (T-BASIC)
• BASIC PLUS
• GW BASIC
• QUICK BASIC (Q-BASIC)
• VISUAL BASIC (V-BASIC)

EVALUATION

1. What is BASIC?
2. List FIVE versions of BASIC.

THE BASIC INTERPRETER

For the computer to execute your instructions in order to produce the desired result, the instruction must be first be interpreted to what the computer can understand by another program called the BASIC INTERPRETER (or TRANSLATOR). The BASIC interpreter converts your program into a form that can be executed directly by the computer.

EVALUATION

1. What is a BASIC interpreter?

KEYWORDS IN BASIC

This is also referred to as BASIC statement or a reserved word. It is an instruction in BASIC, which has a specific means to the compiler or interpreter.

1. REM STATEMENT

The REM statement is a remark statement. It is used to insert remarks in the program. Such remarks are used to explain what the program is all about.

Example:

10 REM This program finds the average of 5 numbers

1. LET STATEMENT

The LET statement is used to assign (or give) values to variables.

Examples:

10 LET A = B + C

1. INPUT STATEMENT

Input is used to assign or give values to variables while program is running. It can be used with both numeric and string variables.

Examples:

10 INPUT A, B, C

1. PRINT STATEMENT

The print statement tells your computer to display the output of the executed program on the screen of the monitor (VDU).

Example:

10 PRINT SUMS

1. END STATEMENT

End Statement is an instruction used to terminate the program. One the computer encounters END statement, it automatically terminates the program.

50 END

1. RUN STATEMENT

The RUN statement is used to execute a program. In Q-BASIC, F5 is used to RUN a program. Note that the program will not RUN if any mistake or error is detected in it.

EVALUATION

1. Write the function of the following BASIC keywords   (a)  LET (b) INPUT       (c) PRINT       (d) REM           (e) RUN

Hiit @ School, Computer Studies for Senior Secondary Education. Pg 110

WEEK 9 WEEKEND ASSIGNMENT

1. ……………… converts your program into a form that can be executed directly by the computer  (a) Software (b) Interpreter              (c) Hardware
1. BASIC means BEGINNNERS ALL-PURPOSE SYMBOLIC INSTRUCTION …………….. (a) Code (b) Centre                    (c) Computer
1. ………………….. used to assign (or give) values to variables  (a) REM (b) INPUT                   (c) LET
1. ………………… statement is used to execute a program   (a) INPUT (b) RUN                       (c) END
1. …………….. is used to RUN a program  (a)  F5 (b) F10                         (c) F1

THEORY

1. What is BASIC?
2. Write the function of the following BASIC keywords   (a)  LET (b) INPUT       (c) PRINT       (d) REM           (e) RUN