0% found this document useful (0 votes)
312 views5 pages

ICT SS1 WK9 PROGRAMMING LANGUAGE II (BASIC)

The document provides a lesson plan for teaching word processing in ICT class. It outlines the learning objectives, activities, and content that will be covered in the lesson. The content section defines basic terms related to word processing like BASIC, character set, statements, and provides examples of basic programs.

Uploaded by

ariyodaniel301
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
312 views5 pages

ICT SS1 WK9 PROGRAMMING LANGUAGE II (BASIC)

The document provides a lesson plan for teaching word processing in ICT class. It outlines the learning objectives, activities, and content that will be covered in the lesson. The content section defines basic terms related to word processing like BASIC, character set, statements, and provides examples of basic programs.

Uploaded by

ariyodaniel301
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

MERC- KING SCHOLARS’ ACADEMY

1, Onabola street, Pedro, Lagos.


LESSON PLAN
Week:10 Term: Second Session: 2023/2024
Subject: ICT Topic: WORD PROCESSNG
Class: SS1 Date: /2024 Ref Books:
i. Model computer/ict for sss, book 1 by Dinehin
Victoria.
ii. computer studies for sss, book 1-3 by Hiit Plc
III. Internet

Lesson Period: 2
Learning Objectives Previous learning:
At the end of the lesson, Students have been typing and editing text using the
Students should be able to, computer
1. Define Basic
2. State basic Character Set
3. Mention basic Statements
4.
Learning Activities in Steps Learning Skills
Critical thinking, Creative thinking, Problem solving,
Step1: The Topic will be introduced to the students Communicating and Collaborating
Step 2: Students would be taken through the detailed Evaluative Questions
explanation of the lesson 1. What is a Word processor?
Step 3: Students would be allowed to write down notes 2. What are the uses of a Word processor?
Step4: Students would be evaluated based on the Assignments:
behavioral objectives 1. What is the difference between a Word processor and
Word processing?
2. Describe how to load Ms-Word.
3. Practical

Content 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. Its syntax is close to the natural way of solving some human
problems.

The two professors, John Kemeny and Thomas Kurtz developed the language in 1964 at Dartmouth College,
USA, as means of teaching students a simple language for programming a computer.
There are so many 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 Character Set
BASIC has the character set consisting of the following elements”

i. Alphabets: A, B, C, -----, Z and lower case letters (a-z) of the English alphabet.
ii. Digits: 0, 1, 2, ---- 9
iii. BASIC recognizes the following special characters.
# = Number (or pound) sign(suffix for double-precision data type)
$ = Dollar sign (suffix for string data type)
% = Per cent (suffix for string data type)
& = Ampersand
’ = Single quotation mark (apostrophe)
() = Left and right parenthesis
* = Asterisk or multiplication symbol
+ = Plus sign
, = Comma
- = Minus sign
. = Period or decimal
/ = Slash or division
: = Colon
; = Semi-colon
= = Equal sign or assignment symbol
< = Less than
> = Greater than
? = Question mark
@ = At symbol
\ = Backslash or integer division symbol
^ = Up arrow or exponentiation symbol
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.

BEEP Statement: The BEEP statement sounds the ASCII bell character.

CLS Statement: This program when executed will 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.

BASIC Arithmetic Operators


They are expressed in terms of a hierarchy of operators in which operations of high priority are performed first.

Examples:
Operator Symbol Operation
^ Exponential
* Multiplication
/ Division
+ Addition
- Substraction

BASIC Arithmetic Expressions


These arithmetic Expressions are not formed according to the same rules of Algebra and Mathematics. The
following symbols are used to denote arithmetic operations.

Operators Meaning BASIC EXPRESSION Math Equivalent


+ Addition A= A + B A=A+B
- Subtraction Sum = Sum – 10 Sum = Sum – 10
* Multiplication J=J*4 J = 4J
/ Division PI = 22/7 PI= 22/7
^ Exponentiation J = J + 2^2 J = J + 2²

Basic Relational Operators


Operator Relation Tested Expression
= Equality X=Y
<> Inequality X <> Y
< Less than X<Y
> Greater than X>Y
<= Less than or equal to X <= Y
>= greater than or equal to X >= Y
Rules for forming Arithmetic Expressions
1. The hierarchy of arithmetic operations are followed except when grouped by parentheses.
2. It is illegal for two arithmetic operators to be close to each other unless separated by parentheses
3. Expressions are evaluated from left to right.

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

You might also like