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.

CLICK HERE to download the complete Document: DOWNLOAD HERE

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  JSS1 Cultural and Creative Art (CCA) Lesson Note on Paper Craft Folding Technique

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.