Term: 2nd Term
Week: 6
Class: Junior Secondary School 2
Age: 13 years
Duration: 40 minutes of 2 periods each
Date:
Subject: Computer studies
Topic:- BASIC
SPECIFIC OBJECTIVES: At the end of the lesson, pupils should be able to
INSTRUCTIONAL TECHNIQUES: Identification, explanation, questions and answers, demonstration, videos from source
INSTRUCTIONAL MATERIALS: Videos, loud speaker, textbook, pictures
INSTRUCTIONAL PROCEDURES
PERIOD 1-2
PRESENTATION |
TEACHER’S ACTIVITY |
STUDENT’S ACTIVITY |
STEP 1 INTRODUCTION |
The teacher revises the previous lesson on BASIC |
Students pay attention |
STEP 2 EXPLANATION |
She lists the key BASIC statements |
Students pay attention and participates |
STEP 3 DEMONSTRATION |
She explains the key BASIC statements |
Students pay attention and participate |
STEP 4 NOTE TAKING |
The teacher writes a summarized note on the board |
The students copy the note in their books |
NOTE
BASIC
a. REM: It is used in explaining what the program is all about. Example, 10 REM. Program to calculate average of numbers. This statement will appear as comment on the screen
2. Assignment Statement: This keyword is used in assigning values to variables, e.g. READ, DATA, LET, INPUT
A. READ statement: This is a statement used in giving values to variables. Usually READ statement has DATA statement with it.
Examples,
I 10 READ I,M,N
20 DATA 5,7,9
II 10 READ A,B,C
20 DATA 1,2,3
B. DATA statement:This statement is used in attaching strings of fixed characters and numeric data in BASIC. A DATA statement can have one piece of data or many. Either of these is called DATA element.
DATA elements are separated by commas (,).
Examples,
I 10 READ A,B,C,D
20 DATA 6,7,15,10
30 PRINT “SUM” = A+B+C+D
40 RUN
SUM =38
II 10 REM PROGRAM TO SUM NUMBERS
20 READ X,Y,Z
30 DATA 15,10,20
40 PRINT “SUM” = X+Y+Z
SUM = 45
C. LET statement:This statement is used in attaching strings of fixed characters and numeric data in BASIC.
Examples,
I 5 LET A = 50
10 LET B = 10
15 LET C = A + B
Here the lines are 5, 10, 15
II 10 READ A, B,C,D
20 DATA 6,7,15,10
30 LET SUM = A +B + C + D
RUN
SUM = 38
D. INPUT statement: This statement is used assigning values to variables.
Examples,
I) 10 INPUT A
20 INPUT B
30 INPUT C
40 PRINT A, B, C
These keywords are used to terminate the program, e.g. STOP AND END
a) STOP statement: This statement is used to terminate a program.
b) END statement: This statement is used to terminate a program.
Example,
10 REM
20 GOTO 50 (The program moves to line 50)
30 READ A, B ,C, D
40 PRINT “SUM” = A+B+C+D
50 STOP
This keyword is reversed to display output from the computer, e.g. PRINT
a) PRINT statement: This statement is used to transmit or display output data from the computer. The PRINT statement is usually followed by a list of items to be displayed and each item is separated by a comma (,) or semi-colon (;)
Examples are:
I) 10 PRINT A, B, C
20 PRINT “X” =; “Y” = Y
This statement will cause the monitor to display whatever is stored in the non-numeric variables ABC and whatever is stored in X and Y.
II) PRINT (2*4)/2
The monitor will display 60
III) 5 LET A = 50
10 LET B = 10
15 LET C = A + B
20 PRINT C
The monitor will display 60
EVALUATION: 1. List and explain three key BASIC statements
CLASSWORK: As in evaluation
CONCLUSION: The teacher commends the students positively