Second Term Lesson Note for Week Two
Class : JSS 2
Subject : Computer Studies
Topic : BASIC Programming Language
Duration : 40 Minutes
Period : Single Period
Reference Book :
Computer Studies for Junior Secondary School, Basic 8 (JSS 2).
Lagos State Unified schemes of work for Junior Secondary School, JSS 1 – 3.
Online Resources
Instructional Material : Chart showing the Terms and definition used in BASIC Programming language.
Learning Objectives : By the end of the lesson learners will be able to :
i. Describe BASIC Programming Language
ii. Identify the elements of BASIC programming language
Content :
ELEMENTS OF QBASIC
INTRODUCTION
BASIC Programming language simply means Beginners All-Purpose Symbolic Instruction Code. Every programming language consists of some basic elements which are required to make a program. The element required to construct a BASIC program consists of a set of characters, keywords, constants, variables, operators and expressions.
1. CHARACTER SET
The BASIC Character Set consists of alphabets (both small and capital), numbers (0 to 9) and special characters. These special characters have their own meaning and function.
2. KEYWORD
Keywords are those words which have special meanings in BASIC. Keywords are statements or Reserved Words, commands, and names of operators. Some reserved words are CLS, REM, INPUT, LET, PRINT, FOR, DO, SELECT, MID$, ASC, SQR, LEN, LEFT$, TIME$ and INT.
3. CONSTANTS
Constants are the data or the values in a program that cannot be changed during the program execution. The data may be a letter, words, numbers, or special characters. Types of constant are
a. Sting Constant
b. Numeric Constant
4. VARIABLE
A variable is an entity that stores data needed to be used in a program. Each program defines different number of variables.
There are mainly two types of variables. They are:
i. String Variable
ii. Numeric Variable
5. OPERATOR
Operators are symbols that indicate the type of operation BASIC has to perform on the data
There are four types of operators in BASIC. They are Arithmetic Operators, Relational Operators, Logical Operators and Sting Operator.
QBasics Math Operators
OBJECTIVES:
Using QBasic Math Operators
Use Order of Operation
Store the results of calculations in variables
Print the result of calculations
A Math Operator is a symbol use for addition, subtraction, multiplication, division, or other calculations
The QBasic math operators and their meanings.
Symbol Meaning
i. * Multiplication
ii. / Division
iii. + Addition
iv. – Subtraction
v. ^ Exponentiation
vi. \ Integer division
vii. Mod Modulus
Example: (95/2=47.5)
Formula Results
i. 8\2 = 4
ii. 95\2 = 47
iii. 95.0\2 = 47
iv. 95\2.0 = 47
v. 95.0\2.0. = 47
Evaluation :
1. What is the full meaning of BASIC Programming language.
2. Mention five keywords in BASIC Programming language.
3. The Character set consist of ___________, _____________ and ____________
4. Define Variable
5. List the two types of variables in Basic programming language
6. What are the four types of operator in BASIC?
CONCLUSION : The teacher summarizes the lesson and marks the learners notebooks.