SUBJECT: I.C.T
CLASS: SS 2
DATE:
TERM: 3rd TERM
WEEK 3
TOPIC: BASIC PROGRAMMING II
BASIC BUILT IN FUNCTIONS
These are Mathematical functions that are built into BASIC. Some common BASIC functions are shown below:
SIMPLE BASIC PROGRAM TO ILLUSTRATE BUILT-IN FUNCTION
SQR – Finds the square root of a positive number.
10 PRINT SQR (275)
ABS – This displays the absolute value of a given number.
10 CLS
20 LET A = 10
30 LET B = 12
40 LET C = A + B
50 PRINT ABS(C)
60 END
LOG – Using natural logarithm.
10 CLS
20 PRINT LOG (56.5)
SIN – Finds the Sine of an angle.
10 CLS
20 PRINT SIN (45)
COS – Finds the Cosine of an angle.
10 CLS
20 PRINT COS (92)
TAN – Finds the tangent of an angle.
10 CLS
20 PRINT TAN (108)
EXP – Finds the exponential of a number.
10 CLS
20 PRINT EXP (4)
30 END
INT – Finds the integer of a real number.
10 CLS
20 PRINT INT (258.36)
30 END
READING ASSIGNMENT: HiiT @ School, Computer Studies for Senior Secondary Education. Chapter Five, pages 110.
WEEKEND ASSIGNMENT
OBJECTIVES
THEORY
© Lesson Notes All Rights Reserved 2023