BASIC Programme Language
Download the Lessonotes Mobile Nigeria 2025 app for faster lesson access on Android and iPhone.
Subject: Computer & IT
Class: Senior Secondary 1
Term: 3rd Term
Week: 4
Theme: Developing Problem-Solving Skings
This page supports the lesson note with a companion video and a short classroom-ready summary.
For class groups and homework, share this lesson page so learners also get the summary, objectives, and full lesson context.
State the fullmeaning of'BASIC' List BASICcharactersetting List some BASICstatements List BASICarithmeticoperators Write BASICnotations for arithmeticexpressions Write simple BASICprograms
BASIC stands for Beginner's All-purpose Symbolic Instruction Code.
Beginner's: It was designed to be easy to learn and use, particularly for those new to programming.
All-purpose: It could be used for a wide range of applications, from scientific calculations to business tasks.
Symbolic: It uses symbols and English-like words rather than complex machine code.
Instruction Code: It is a set of instructions that a computer can understand and execute to perform specific tasks. The BASIC character set refers to the collection of valid characters that the BASIC interpreter recognizes and uses to form statements, commands, and expressions.
These include: Alphabets: Uppercase English letters: A, B, C, ..., Z Lowercase English letters: a, b, c, ..., z (though many older BASIC versions were case-insensitive or only supported uppercase for keywords)
Numerals: Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Special Characters: These are symbols used for operations, punctuation, and specific functions.
Common examples include: Arithmetic operators: `+` (addition), `-` (subtraction), `` (multiplication), `/` (division), `^` or `**` (exponentiation)
Relational operators: `=` (equals), `` (greater than), `=` (greater than or equal to), `<>` or `!=` (not equal to)
Punctuation: `.` (period/decimal point), `,` (comma), `;` (semicolon), `:` (colon), `"` (double quotes), `'` (apostrophe for remarks in some versions)
Parentheses: `(` `)` Dollar sign: `$` (often used to denote string variables, e.g., `NAME$`)
Others: `&` (ampersand), `%` (percent sign), `!` (exclamation mark - for single precision in some BASICs), `#` (hash - for double precision in some BASICs), `@`, `?` (shortcut for PRINT in some versions) BASIC statements are the commands or instructions given to the computer to perform specific actions. Each statement typically starts with a line number (which dictates execution order) and a keyword. `REM` (Remark): Purpose: Used to add comments or explanatory notes within a program. The computer ignores these lines during execution.
Syntax: `REM` comment text
Example: `10 REM This program calculates area of a circle` `LET` (Assignment): Purpose: Used to assign a value to a variable. It's often optional in many BASIC versions, meaning `X = 10` works the same as `LET X = 10`.
Syntax: `LET` variable `=` expression/value
Example: `20 LET RADIUS = 7` or `20 RADIUS = 7` `INPUT` (Input): Purpose: Used to prompt the user to enter data from the keyboard during program execution.
Syntax: `INPUT` [prompt string;] variable1 [, variable2,...]*
Example: `30 INPUT "Enter your name: ", NAME$` (The prompt string is optional but good practice) `PRINT` (Output): Purpose: Used to display text, variable values, or results of expressions on the screen.
Syntax: `PRINT` [expression/string/variable] [, or ; or TAB(n)]*
Example: `40 PRINT "Hello, World!"` `50 PRINT "The radius is: "; RADIUS` `60 PRINT A + B` `END` (Terminate): Purpose: Used to stop the execution of a BASIC program. It should typically be the last statement.
Syntax: `END`
Example: `90 END` `GOTO` (Unconditional Jump): Purpose: Transfers program control to a specified line number. Often used for simple loops or skipping sections of code.
Syntax: `GOTO` line_number
Example: `70 GOTO 30` (creates an infinite loop back to line 30) `IF...THEN` (Conditional Branching): Purpose: Executes a statement or transfers control to a specific line number only if a certain condition is true.
Syntax: `IF` condition `THEN` statement [or `GOTO` line_number]
Example: `80 IF SCORE >= 50 THEN PRINT "Pass"` or `80 IF SCORE >= 50 THEN GOTO 100` These operators are used to perform mathematical calculations within a BASIC program. The order of operations (precedence) is crucial for correct calculations, typically following the PEMDAS/BODMAS rule.
Exponentiation: `^` or `**` (e.g., `2^3` means 2 raised to the power of 3, which is 8)
Multiplication: `` (e.g., `5 4` is 20)
Division: `/` (e.g., `10 / 2` is 5)
Addition: `+` (e.g., `3 + 7` is 10)
Subtraction: `-` (e.g., `12 - 5` is 7) Order of Precedence (PEMDAS/BODMAS equivalent): Parentheses `()` (or Brackets) Exponentiation `^` (or Orders/powers) Multiplication `*` and Division `/` (from left to right) Addition `+` and Subtraction `-` (from left to right)
Understanding BASIC programming, even at a fundamental level, provides valuable insights into how technology functions and can be applied in various Nigerian contexts: Local Market and Small Business Management: Students can conceptualize or design very basic programs to assist small local businesses. For example, a program to calculate the total cost of items purchased from a local market stall (e.g., calculating price per mudu of rice or derica of beans), track simple inventory, or calculate profit/loss for a provision store. This fosters entrepreneurial thinking and digital application skills relevant to local economies. Community Data Collection and Simple Analysis: Imagine a community health worker needing to record basic information like age and number of children in a household. Students can understand how a simple program could input this data and perform basic calculations (e.g., count households with more than 5 children, calculate average age). This promotes an understanding of data management for community development initiatives.
Educational Tools and Games: Given the limited access to advanced educational software in many Nigerian schools, students can begin to think about creating simple interactive learning tools or educational games using BASIC logic. For instance, a program that quizzes users on state capitals or multiplication tables. This encourages innovation in creating localized educational resources.