Page 97 - TP_Play_V2.1_class7
P. 97
Look at these examples:
Example 1:
Example 2:
READ Subject
READ marks
IF Subject = "Maths" THEN
PRINT "Take out Maths book & IF marks > 50 THEN
notebook" PRINT "Pass"
ELSE ELSE
PRINT "Check timetable" PRINT "Fail"
Example 3: Example 4:
READ Rain READ age
IF Rain = True THEN IF age >= 18 THEN
PRINT "Carry an umbrella" PRINT “You are eligible to vote.”
ELSE ELSE
PRINT "Do not carry an PRINT “You are not eligible to vote.”
umbrella"
Recap
An algorithm is a set of step-by-step instructions in a sequential manner to solve a
problem.
The raw data is collected, filtered, sorted, processed, analysed, stored, and then
presented in a readable format, called information.
Conditional statements are used in a program to instruct the computer to make a
decision.
Exercise
A. Tick ( ) the correct option.
1. What is a flowchart?
a. A type of computer virus
b. A type of computer
c. A pictorial representation of an algorithm
d. A type of computer processor
Algorithmic Intelligence 95

