Select Page

The website has the complete lesson note for all the subjects in secondary school but this piece showcases the JSS2 Computer Studies Lesson Note on Basic Programming Language.Â You can use the website search button to filter out the subject of interest to you.

TOPIC:Â Â  BASIC PROGRAMMING LANGUAGE

CONTENT:Â Â

• Basic Language:
• Meaning of BASIC
• BASIC character set
• Key BASIC Statement: Line number ii. Remark (REM) iii. Assignment (LET, INPUT, DATA). Â iv. Output StatementÂ Â Â  v. PrintÂ Â Â Â  vi. Program Terminator (END, STOP)
• Simple BASIC Statements

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. The original BASIC was designed by John Kemeny and Thomas Kurtz in the mid 1960â€™s at Dartmouth College in New Hampshire, USA. It consists of statements written in English words and mathematical notation. It is written in English-like and mathematical notations.

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. This does not mean that there is a statement called START.
7. The End statement must be the last entry in a program.
8. Spaces should be inserted to make the program more readable

BASIC Character Set

1. Character Set: These are the acceptable characters in BASIC programming. e.g. Numbers Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  0 – 9, Â Â  Alphabets Â Â Â Â Â Â  A – Z, a â€“ z,Â Â  Â Â Â Â Â Â Â Special characters or symbolsÂ Â  +, -, *, /, <, &,:,; etc
2. Data Constants & Data Variables
3. Data Constant (or constants):These are data that do not change during the course of computation or program execution.
4. Data Variables (variables): They are data that can change in constant numerals versus variable numerals.
SEE ALSO  Primary Two Second Term Lesson Note For Agricultural Science

Constant data Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  Variables data

10 Â Â Â Â Â Â  A = 1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  10 INPUT A

20Â Â Â Â Â Â Â  B = 2Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  20 INPUT B

30Â Â Â Â Â Â Â  Sum = A + B Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  Â Â Â Â Â Â Â Â Â Â Â  30 Sum = A + B

40Â Â Â Â Â Â Â  PRINT SUM Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  Â Â Â Â Â Â Â Â Â Â Â  40 PRINT SUM

50Â Â Â Â Â Â Â  END Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  50 END

1. Keyword:

This is also referred to as a BASIC statement. It is an instruction which has special meaning to the computer or BASIC interpreter. Examples: REM, LET, INPUT, READ, PRINT, GOTO, FORâ€¦., NEXT etc. these must not be used as a variable name during the course of writing any BASIC program.

What is a Variable?Â  A variable is a symbol that can represent any value. Variables are used to represent values needed for processing during program executions. A Variable can be any alphabet or combination of alphabets.

Rules guiding Variable names:

1. It begins with a letter
2. It does not nave spaces
3. It should not be the same name as a word already used by the BASIC language such as END, LET, and PRINT etc.

Types of Variables:

Click on the Downloadable Button to get the FULL NOTE

Copyright warnings! Do not copy.