0% found this document useful (0 votes)
15 views7 pages

Ict WK 3.1

The document outlines performance objectives for a Basic Programming II lesson, focusing on writing simple programs using built-in functions. It includes examples of programs that calculate the square root of numbers, the tangent of a given angle, and the cosine of known values. Each program is presented with line numbers and comments to guide learners through the coding process.

Uploaded by

geogrjonathan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views7 pages

Ict WK 3.1

The document outlines performance objectives for a Basic Programming II lesson, focusing on writing simple programs using built-in functions. It includes examples of programs that calculate the square root of numbers, the tangent of a given angle, and the cosine of known values. Each program is presented with line numbers and comments to guide learners through the coding process.

Uploaded by

geogrjonathan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

ICT

TOPIC
BASIC PROGRAMMING II
PERFORMANCE OBJECTIVES
AT THE END OF THIS LESSON, LEARNERS SHOULD BE ABLE TO:
• WRITE SIMPLE BASIC PROGRAMS USING BUILT-IN FUNCTIONS
FIND THE SQUARE ROOT OF NUMBERS IN A GIVEN RANGE

10 REM “FIND SQUARE ROOT OF NUMBERS

20 READ A, B

30 DATA 1, 10

40 FOR I = A TO B

50 PRINT “THE SQUARE ROOT OF”; A; “IS”;


SQR(A)

60 NEXT A

70 END
FIND THE TANGENT OF GIVEN ANGLE

REM FIND TANGENT OF GIVEN ANGLE


10 INPUT “ENTER NUMBER” A
20 S = TAN(A)
30 PRINT “THE TANGENT OF “A”; “IS”; S
40 END
FIND THE SQUARE ROOT OF NUMBERS.
10 REM “Find Square root of numbers

20 INPUT “Enter first number”; A

30 FOR X = 10 TO 50 STEP 1

40 LET Q = SQR(X)

50 PRINT X, Q

60 NEXT X

70 END
FIND THE SQUARE ROOT S ROUNDED TO AN INTEGER.

10 REM “Find Square root S

20 INPUT “Enter first number”; A

30 S = INT(SQR(A))

40 PRINT “The square root of S rounded off”; A; “is”;S

50 END
FIND THE COSINE OF KNOWN VALUES
10 REM “Find Cosine of known values”

20 INPUT “Enter number”; A

30 S – SIN(A)

40 PRINT “The SIN of”;A;”is”; S

50 PRINT “The square root of”; A; “is”; SQR(A)

60 END

You might also like