Class: Senior Secondary School 2 (SS2 / SSS2)
Term: 3rd Term
Week: 4
Age: 16 years
Duration: 45 minutes
Subject: Computer Studies
Curriculum Theme: Programming and Problem Solving
Previous Lesson: Algorithms and Flow Chart: Flowchart Symbols and Their Uses.
Topic: BASIC PROGRAMMING II
Subject Matter: Meaning of BASIC programming (simple high-level programming language), built-in functions (SQR, INT(X), SIN(X), ABS(X), RND(X), COS(X), TAN(X), LOG(X), EXP(X)), basic notations.
Specific Objectives
By the end of the lesson, pupils should be able to:
Cognitive Domain:
- Define BASIC programming language.
- Identify various built-in functions in BASIC.
- Explain the purpose and usage of common built-in functions.
Affective Domain:
- Appreciate the importance of built-in functions in simplifying programming tasks.
- Show interest in using built-in functions for problem-solving.
Psychomotor Domain:
- Write simple BASIC expressions using built-in functions.
- Interpret simple BASIC programs containing built-in functions.
Social Domain:
- Collaborate with peers to discuss different built-in functions.
- Participate actively in class discussions about programming concepts.
Reference Materials
The following resources were used in planning this lesson:
- Senior Secondary Schools Education Curriculum
- State Unified Scheme of Work
- Adeola, J. A. (2018). Comprehensive Computer Studies for Senior Secondary Schools 2. Learn Africa Plc.
- https://www.tutorialspoint.com/basic/basic_built_in_functions.htm
Instructional Materials
The teacher will teach this lesson with the aid of:
- Computer system
- BASIC interpreter screenshot
- Function list chart
- Worksheets
Rationale for the Lesson
This lesson helps pupils understand how to use pre-defined functions in BASIC programming, which simplifies complex calculations and improves code efficiency. This knowledge is important for writing effective programs and solving real-world problems using computational tools.
Prerequisite/Previous Knowledge
Pupils are expected to have prior knowledge of basic programming concepts, including variables, data types, and simple input/output statements in BASIC.
Lesson Content/Board Summary
BASIC PROGRAMMING II
Meaning of BASIC Programming Language
BASIC stands for Beginner’s All-purpose Symbolic Instruction Code. It is a simple, high-level programming language designed for ease of use. It allows users to write programs that perform various tasks, including calculations, data manipulation, and graphics.
Built-in Functions in BASIC
Built-in functions are pre-defined routines in BASIC that perform specific tasks or calculations. They save programmers time and effort by providing ready-to-use solutions for common operations. These functions take arguments (inputs) and return a result (output).
The following are common built-in functions in BASIC:
- SQR(X) – Returns the square root of X. X must be a non-negative number.
Example:
PRINT SQR(25)will output5 - INT(X) – Returns the largest integer less than or equal to X. It truncates the decimal part of a number.
Example:
PRINT INT(7.8)will output7
Example:PRINT INT(-3.2)will output-4 - ABS(X) – Returns the absolute value of X. This means it returns the positive value of X, regardless of whether X is positive or negative.
Example:
PRINT ABS(-10)will output10
Example:PRINT ABS(5.5)will output5.5 - RND(X) – Generates a random number. The behavior might vary slightly depending on the BASIC interpreter, but often RND(1) generates a random number between 0 and 1.
Example:
PRINT RND(1)might output0.4567 - SIN(X) – Returns the sine of X, where X is an angle in radians.
Example:
PRINT SIN(0)will output0(approximately) - COS(X) – Returns the cosine of X, where X is an angle in radians.
Example:
PRINT COS(0)will output1(approximately) - TAN(X) – Returns the tangent of X, where X is an angle in radians.
Example:
PRINT TAN(0)will output0(approximately) - LOG(X) – Returns the natural logarithm (base e) of X. X must be a positive number.
Example:
PRINT LOG(2.718)will output1(approximately) - EXP(X) – Returns e raised to the power of X (e^X), where e is the base of the natural logarithm (approximately 2.71828).
Example:
PRINT EXP(1)will output2.71828(approximately)
Basic Notations in BASIC Programming
BASIC uses standard mathematical operators and notations for expressions:
- + : Addition
- – : Subtraction
- * : Multiplication
- / : Division
- ^ : Exponentiation (power)
- ( ) : Parentheses for grouping expressions and controlling order of operations.
Example: PRINT (5 + 3) * 2 will output 16
Example: PRINT 4 ^ 2 will output 16
Teaching Methods/Instructional Techniques
Discussion, Lecture, Demonstration, Question and Answer, Visual Aids
Instructional Procedures
Step 1: Introduction
Time: 5 minutes
Teaching Skill: Set Induction
Teacher’s Activity: The teacher greets the pupils and reviews the previous lesson on basic programming concepts. The teacher then introduces the topic by asking pupils if they know what “shortcuts” are in daily tasks.
Pupils’ Activity: Pupils respond to the greetings, recall previous knowledge, and share ideas about shortcuts.
Learning Point: Pupils are prepared for the new lesson and connect it to familiar concepts.
Step 2: Meaning of BASIC Programming
Time: 7 minutes
Teaching Skill: Explanation/Definition
Teacher’s Activity: The teacher defines BASIC programming language, explaining its full meaning and its purpose as a high-level language. The teacher uses the computer system to show a simple BASIC program.
Pupils’ Activity: Pupils listen attentively, take notes, and ask questions for clarification.
Learning Point: Pupils understand the fundamental nature of BASIC programming.
Step 3: Introduction to Built-in Functions
Time: 8 minutes
Teaching Skill: Explanation/Identification
Teacher’s Activity: The teacher explains what built-in functions are in programming, emphasizing their role in simplifying tasks. The teacher presents a chart listing various built-in functions like SQR, INT(X), ABS(X), SIN(X), COS(X), TAN(X), LOG(X), EXP(X), and RND(X).
Pupils’ Activity: Pupils identify the functions from the chart and listen to the explanation.
Learning Point: Pupils grasp the concept and importance of built-in functions.
Step 4: Explanation of Specific Functions
Time: 10 minutes
Teaching Skill: Demonstration/Elaboration
Teacher’s Activity: The teacher explains each built-in function (SQR, INT(X), ABS(X), SIN(X), COS(X), TAN(X), LOG(X), EXP(X), RND(X)) one by one, providing simple examples and demonstrating their usage on a computer system or using screenshots.
Pupils’ Activity: Pupils observe the demonstrations, listen to explanations, and copy examples into their notes.
Learning Point: Pupils understand the specific purpose and syntax of each function.
Step 5: Practice with Built-in Functions
Time: 7 minutes
Teaching Skill: Guided Practice
Teacher’s Activity: The teacher provides worksheets with simple expressions for pupils to evaluate using the built-in functions taught. The teacher moves around to assist pupils and check their work.
Pupils’ Activity: Pupils attempt to solve the expressions on their worksheets using the built-in functions.
Learning Point: Pupils gain practical experience in applying built-in functions.
Step 6: Basic Notations
Time: 3 minutes
Teaching Skill: Explanation
Teacher’s Activity: The teacher briefly explains basic notations and operators used in BASIC programming, such as +, -, *, /, ^, and parentheses, reinforcing their order of operations.
Pupils’ Activity: Pupils listen and note down the operators and their functions.
Learning Point: Pupils understand how to write mathematical expressions correctly in BASIC.
Step 7: Evaluation/Review
Time: 5 minutes
Teaching Skill: Questioning/Assessment
Teacher’s Activity: The teacher evaluates the learning by asking the following questions:
- What does BASIC stand for?
- Mention any three built-in functions in BASIC.
- Explain the purpose of the
SQR(X)function. - Evaluate the expression:
PRINT INT(9.3) + ABS(-4).
Pupils’ Activity: Pupils answer orally and in writing.
Learning Point: Pupils demonstrate understanding of the lesson.
Step 8: Conclusion
Time: 1 minute
Teaching Skill: Summarization
Teacher’s Activity: The teacher summarizes the key points of the lesson, emphasizing the utility of built-in functions in programming. The teacher assigns homework, asking pupils to research other built-in functions in BASIC.
Pupils’ Activity: Pupils listen to the summary and note down the homework.
Learning Point: Pupils consolidate their learning and prepare for further exploration.
Lesson Keywords
- BASIC – Beginner’s All-purpose Symbolic Instruction Code
- Built-in Function – A pre-defined routine in a programming language that performs a specific task.
- SQR(X) – Returns the square root of X.
- INT(X) – Returns the integer part of X.
- ABS(X) – Returns the absolute (positive) value of X.
Differentiation
For pupils who grasp concepts quickly, the teacher will provide more complex problems involving nested functions or combinations of functions. For pupils who need more support, the teacher will offer one-on-one assistance, simplified examples, and additional practice exercises with step-by-step guidance.
Note for teachers using this lesson plan
Ensure that the computer system used for demonstration has a working BASIC interpreter or that screenshots clearly illustrate the output of each function. Encourage pupils to experiment with different values for the function arguments. Emphasize the importance of understanding the data type requirements for each function (e.g., SQR requires non-negative numbers).




Community Join the conversation Open discussion +