0% found this document useful (0 votes)
82 views2 pages

jss 2 week 2 i.c.t note

BASIC stands for Beginner All-purpose Symbolic Instruction Code, designed for ease of use with syntax resembling natural language. The document outlines rules for programming in BASIC, including the use of capital letters, line numbers, and specific statements like REM and LET. It also describes elements such as character sets, data constants, and variables, along with key statements necessary for writing BASIC programs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views2 pages

jss 2 week 2 i.c.t note

BASIC stands for Beginner All-purpose Symbolic Instruction Code, designed for ease of use with syntax resembling natural language. The document outlines rules for programming in BASIC, including the use of capital letters, line numbers, and specific statements like REM and LET. It also describes elements such as character sets, data constants, and variables, along with key statements necessary for writing BASIC programs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

BASIC PROGRAMMING

Meaning of BASIC
BASIC stands for Beginner All-purpose Symbolic Instruction Code. It consists of statements
written in English words and mathematical notation. Its syntax is close to the natural way of
solving some human problems.
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.
7. End/Stop statement must be the last entry in a program.
Element of BASIC
1. Character Set: This refers to any letter, number, sign or symbol and punctuation mark
in any language used for representation of information. Character set are: Numbers 0-9,
Alphabets A - Z, Special characters or symbols +, -, &, :, ; etc

2. Data Constants & Data Variables


A) Data Constant (or constants): These are data that do not change during the course of
computation or program execution.
B) Data Variables (variables): They are data that can change in constant numerals versus
variable numerals.
Constant data Variables data
10 A=1 10 Input A
20 B= 2 20 Input B
30 Sum = A + B 30 Sum = A + B

3. Reserved or 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,
etc.

Key BASIC Statement

i. LINE numbers: In BASIC we need a line number for each basic statement. Numbers
are positive whole numbers from 1 to 99,999. A line number is always in integer form and this
are done to give room for correction when necessary. It is presented in the format below:
10 ……………………..
20 ……………………..
30 ……………………..
40 …………………….. etc.
ii. REM Statement (Remark): REM statements stand for remark. The statement allows
you to add comment and explanatory notes to your program. This may as well include date and
what the program is all about. Computer does not execute REM; it is just a remark that aids the
programmer to remember certain thing about the program.
Examples: REM PROGRAMM TO SAY HELLO
REM TO CALCULATE AREA OF A TRIANGLE

iii. ASSIGNMENT Statement


Assignments consists of the following: INPUT, LET and DATA

INPUT Statement
This allows you to type in data from the keyboard while the program is running. This program
will be able to produce the required result with given data. The input statements have the
general format.
10 INPUT A
20 INPUT B
30 INPUT C

Example: 10 INPUTm “YOUR NAME” =$


10 INPUT “m YOURSURNAME”, =$

LET Statement
The LET statement permits the programmer to assign numbers and formulas to a variable
name.

Example: 10 LET AREA = ½ (b*h)


20 LET JS=”How do you do”
30 LET ANN=50

HOME WORK
a) Explain the meaning of BASIC Programming
b) Explain the Meaning of BASIC
c) Mention the Rules for BASIC programming

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy