0% found this document useful (0 votes)
1 views

BASIC Programming Language - ClassNotes.ng BASIC Language Versions of BASIC

The document provides an overview of the BASIC programming language, including its definition, history, and various versions. It explains key concepts such as character sets, statements, and common keywords used in BASIC programming. The document concludes with an invitation for further questions and a preview of the next class topic on Graphics Packages.

Uploaded by

hermzylee
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

BASIC Programming Language - ClassNotes.ng BASIC Language Versions of BASIC

The document provides an overview of the BASIC programming language, including its definition, history, and various versions. It explains key concepts such as character sets, statements, and common keywords used in BASIC programming. The document concludes with an invitation for further questions and a preview of the next class topic on Graphics Packages.

Uploaded by

hermzylee
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Streaming

February

% Search for Courses & Subjects

Poster submission

Peeref Open

REGISTER LO G I N

BASIC Programming Language


1 Comment / By ClassPrefect / April 19, 2020

Transform Your Career


Master Machine Learning
Become a Data Scientist in 6 months

gomycode.com

OPEN

Back to: COMPUTER SCIENCE JSS2

Welcome to Class !!

We are eager to have you join us !!

In today’s Computer Science class, We will be


discussing the Basic Programming Language. We
hope you enjoy the class!

BASIC PROGRAMMING LANGUAGE

BASIC is an acronym for “Beginners All-purpose


Symbolic Instruction Codes. ” it was a language
designed to teach beginners the construct and theory
of programming language.

It was developed by two students during their academic


years in Dartmouth College, USA under the direction of
professors John G. Kemeny and Thomas E. Kurtz.

Versions of BASIC
1. Q BASIC (Quick BASIC)
2. GW-BASIC
3. BASIC (Visual BASIC)

BASIC Character Set

A character denotes any letter, digit, punctuation


symbols or any other sign used in the representation of
information in any language.

BASIC has the following character set:

1. Alphabetic: A, B, C, …, Y, Z.
2. Numbers: 0, 1, 2, 3, 4, …, 9

Special Characters: ^, *, /, -, +, ( ), <, >, %, !, &, ?,


etc.

BASIC Statements

In BASIC, programs are written in lines and each line


starts with a line number which is a label of that
particular line. Each of the lines is called a STATEMENT.

The line number can vary between 1 and 9999. The


computer carries out (executes) statements in the order
in which they are numbered.

Below are common BASIC keywords that are used to


form a BASIC program.

1. CLS
2. REM
3. LET
4. READ
5. INPUT
6. DATA
7. PRINT
8. END

CLS (Clear Screen):

It helps to clear the screen. Every BASIC program must


begin with CLS to avoid getting an unexpected display
on the screen.

Example:

10 CLS

20 …

30 …

REM (Remark):

It helps to make remarks or comments which make the


program more readable. Any BASIC statement that
begins with REM is not executed.

Example:

10 REM “This program will calculate the average of two


numbers”.

20 …

30 …

LET:

It helps to assign a value of an expression to a variable.

Example:

10 LET A = 10

20 LET B = “OGUN”

30 LET C = B^2

40 LET D = B + C – 5

The above program is the same as:

10 A =10

20 B = “OGUN”

Master Machine Learning


Data Science Certification
Instructor-led | 480h Bootcamp | 3
months guaranteed internship

gomycode.com

OPEN

30 C = B^2

40 D = B + C – 5

Note that the use of LET is optional in BASIC.

READ Statement:

It works hand in hand with a DATA statement. The READ


statement reads/takes values from the DATA statement
and assigns them to the variable after READ.

Example:

10 READ A, B, C

20 DATA 20, 30, “Chelsea”

40 PRINT A, B, C

50 END

Note that the READ statement is used instead of an


INPUT statement when a large amount of data is
involved. INPUT and READ statements cannot be used
at the same time in a particular program.

INPUT:

It allows a value, numeric or string characters to be


typed into the computer via the keyboard and stored in
the memory of the computer at the specified data name.

Example:

10 CLS

20 INPUT A

DATA Statement:

It is used with the READ statement to hold constants to


be read during program execution. DATA statements are
non-executable and can be placed anywhere in a
program.

The items in the DATA statements are first to last and


are assigned in order to the variables found in the READ
statement.

PRINT Statement:

It is an output statement that allows a literal to be


specified to be printed on the monitor or printer e.g. 30
PRINT “Learning programming is fun”. (This line will
print “Learning programming is fun” on the monitor and
returns the cursor to the next line).

END Statement:

This indicates the end of a BASIC program. It is


compulsory otherwise the program will have no end.

Example:

10 PRINT

20 END

We have come to the end of this class. We do hope you


enjoyed the class?

Should you have any further question, feel free to ask in


the comment section below and trust us to respond as
soon as possible.

In our next class, we will be talking about Graphics


Packages. We are very much eager to meet you there.

For more class notes, videos, homework help etc


download our Mobile App HERE

Join ClassNotes.ng Telegram Community HERE for


exclusive content and support

Share this lesson with your friend!

! " # $

Promoted Content

Reduce Fat With Laser Liposuction: See Prices 2023

Diabetes Will Disappear In 7 Days, Sugar Will Fall To


3.9

Portable Solar Generators Clearance Sale Price Might


Surprise You

A Simple Way To Restore Vision Up To 99% In 5 Days

← Previous Lesson
Revision/Computer Programming
Language

Share this lesson with your friend!

! " # $

Next Lesson →
Graphics Packages

Share this lesson with your friend!

! " # $

1 thought on “BASIC
Programming Language”

JULIET BEN
DECEMBER 29, 2022 AT 7:43 PM

thanks alot

Reply

Leave a Reply
Your email address will not be published. Required
fields are marked *

Comment *

Name*

Email*

Website

Save my name, email, and website in this


browser for the next time I comment.

Post Comment

Student’s Menu

Dashboard

My Courses

My Achievements

Edit Account

Sign Out

PRIMARY 6

FULL SUBJECT SYLLABUS

! First Term

" Second Term


#
Revision/Computer Programming Language
#
BASIC Programming Language
#
Graphics Packages
#
Features of Graphic Packages
#
Graphic Packages – Paint
#
Benefits and Disadvantages of ICT
#
ICT Gadgets

! Third Term

Open All · Close All

ClassNotes.ng is an Afrilearn brand.

! 08051544949

$ [email protected]

COMMUNITY

About CN

Teach for CN

Testimonials

Faculty

Careers

Blog

A9liate

Press

Terms of use

Privacy Policy

WEEKLY NEWSLETTER

Name

Your Email

SUBSCRIBE

Copyright © 2020 ClassNotes.ng

" # $ % &
'

You might also like