© 2026 schoolict.net (Ruwan Mangala Suraweera)
9.3 Algorithms: Flowcharts, Pseudocode and Hand Tracesඇල්ගොරිතම: ගැලීම් සටහන්, ව්යාජ කේත සහ අත් අනුරේඛන
Grade 13 A/L ICT · Lesson 913 ශ්රේණිය A/L ICT · පාඩම 9
In this videoමේ වීඩියෝවේ
- An algorithm is a finite set of clear steps.ඇල්ගොරිතමය සීමිත පැහැදිලි පියවර ය.
- Flowcharts use standard symbols.ගැලීම් සටහන් සම්මත සංකේත භාවිත කරයි.
- Pseudocode is structured English.ව්යාජ කේතය ව්යුහගත ඉංග්රීසි ය.
- Trace tables check values by hand.Trace table අතින් අගයන් පරීක්ෂා කරයි.
- Trace before you code.කේතනයට පෙර අනුරේඛනය කරන්න.
Notesසටහන්
Syllabus 9.3. An algorithm is a finite, ordered set of clear steps that solves a problem. We show algorithms as flowcharts (standard symbols) or pseudocode (structured English), and check them with a hand trace (trace table) before coding.විෂය නිර්දේශය 9.3. ඇල්ගොරිතමයක් යනු ගැටලුවක් විසඳන සීමිත, පිළිවෙළ, පැහැදිලි පියවර කට්ටලයකි. අපි ඒවා ගැලීම් සටහන් (සම්මත සංකේත) හෝ ව්යාජ කේත ලෙස පෙන්වා කේතනයට පෙර අත් අනුරේඛනයක් (trace table) මගින් පරීක්ෂා කරමු.
1. Flowchart symbols1. ගැලීම් සටහන් සංකේත
2. Finding the largest number2. විශාලතම සංඛ්යාව සෙවීම
📝 Pseudocodeව්යාජ කේතය (Pseudocode)
BEGIN largest = first number FOR each number n DO IF n > largest THEN largest = n ENDIF ENDFOR DISPLAY largest END
3. Hand trace3. අත් අනුරේඛනය
| nn | n > largest?n > largest? | largestlargest |
|---|---|---|
| 1212 | FalseFalse | 1212 |
| 4545 | TrueTrue | 4545 |
| 77 | FalseFalse | 4545 |
| 3030 | FalseFalse | 4545 |
largest starts at 12. Only 45 is greater, so largest becomes 45; 7 and 30 are not. Output 45 – the Python program below prints the same.largest 12 සිට ආරම්භ වේ. 45 පමණක් විශාල නිසා largest 45 වේ. ප්රතිදානය 45 – පහත Python වැඩසටහනද එයම මුද්රණය කරයි.
🐍 Find the largest numberවිශාලතම සංඛ්යාව සෙවීම
numbers = [12, 45, 7, 30] largest = numbers[0] for n in numbers: if n > largest: largest = n print("Largest:", largest)
▶ Outputප්රතිදානය
Largest: 45
Key Wordsප්රධාන පද
Sample Q&Aආදර්ශ ප්රශ්න සහ පිළිතුරු
1Define an algorithm.ඇල්ගොරිතමය?
2Which symbol shows a decision?තීරණ සංකේතය?
3Which symbol shows input or output?ආදාන/ප්රතිදාන?
4Output for [12, 45, 7, 30]?ප්රතිදානය?
5How many times does largest change after the start?largest වෙනස් වන වාර?
6Why hand trace?අත් අනුරේඛනය ඇයි?
MCQබහුවරණ ප්රශ්න
Choose the correct answer for each question.සෑම ප්රශ්නයකටම නිවැරදි පිළිතුර තෝරන්න.
1A diamond in a flowchart shows aදියමන්තිය
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B
Decision.තීරණය.
2A parallelogram showsසමාන්තරාස්රය
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C
I/O.I/O.
3A rounded rectangle showsරවුම්
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D
Terminal.අන්තය.
4Structured English for an algorithm isව්යුහගත ඉංග්රීසි
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B
Pseudocode.ව්යාජ කේතය.
5The largest of [12, 45, 7, 30] isවිශාලතම
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E
45.45.
6In the trace, n > largest is True forTrue
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E
Only 45.45 පමණි.
7A table of variable values while checking an algorithm is aවගුව
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A
Trace table.Trace table.
8An algorithm must beඇල්ගොරිතමය
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C
Finite and clear.සීමිත, පැහැදිලි.
9Which term means: “Finite ordered unambiguous steps to solve a problem”?“ගැටලුවක් විසඳන සීමිත පිළිවෙළ පැහැදිලි පියවර” යන්නෙන් අදහස් වන පදය කුමක්ද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A
Algorithm – Finite ordered unambiguous steps to solve a problem.ඇල්ගොරිතමය – ගැටලුවක් විසඳන සීමිත පිළිවෙළ පැහැදිලි පියවර.
10Which term means: “Diagram of an algorithm using standard symbols”?“සම්මත සංකේත භාවිත කරන ඇල්ගොරිතම රූපය” යන්නෙන් අදහස් වන පදය කුමක්ද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B
Flowchart – Diagram of an algorithm using standard symbols.ගැලීම් සටහන – සම්මත සංකේත භාවිත කරන ඇල්ගොරිතම රූපය.
11Which term means: “Structured English description of an algorithm”?“ඇල්ගොරිතමයක ව්යුහගත ඉංග්රීසි විස්තරය” යන්නෙන් අදහස් වන පදය කුමක්ද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A
Pseudocode – Structured English description of an algorithm.ව්යාජ කේතය – ඇල්ගොරිතමයක ව්යුහගත ඉංග්රීසි විස්තරය.
12Which term means: “Working through an algorithm by hand to check values”?“අගයන් පරීක්ෂාවට ඇල්ගොරිතමය අතින් ක්රියාත්මක කිරීම” යන්නෙන් අදහස් වන පදය කුමක්ද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E
Hand trace – Working through an algorithm by hand to check values.අත් අනුරේඛනය – අගයන් පරීක්ෂාවට ඇල්ගොරිතමය අතින් ක්රියාත්මක කිරීම.
13Which term means: “Table recording variable values during a trace”?“අනුරේඛනයේදී විචල්ය අගයන් සටහන් කරන වගුව” යන්නෙන් අදහස් වන පදය කුමක්ද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D
Trace table – Table recording variable values during a trace.Trace table – අනුරේඛනයේදී විචල්ය අගයන් සටහන් කරන වගුව.
14Which term means: “Rounded box marking start or stop”?“ආරම්භය හෝ නැවතුම පෙන්වන රවුම් කොටුව” යන්නෙන් අදහස් වන පදය කුමක්ද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D
Terminal symbol – Rounded box marking start or stop.අන්ත සංකේතය – ආරම්භය හෝ නැවතුම පෙන්වන රවුම් කොටුව.
15Which term means: “Rectangle for a calculation or assignment”?“ගණනය හෝ පැවරුම සඳහා සෘජුකෝණාස්රය” යන්නෙන් අදහස් වන පදය කුමක්ද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C
Process symbol – Rectangle for a calculation or assignment.සැකසුම් සංකේතය – ගණනය හෝ පැවරුම සඳහා සෘජුකෝණාස්රය.
16Which term means: “Diamond with a yes/no condition”?“ඔව්/නැත කොන්දේසියක් සහිත දියමන්තිය” යන්නෙන් අදහස් වන පදය කුමක්ද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A
Decision symbol – Diamond with a yes/no condition.තීරණ සංකේතය – ඔව්/නැත කොන්දේසියක් සහිත දියමන්තිය.
17Which term means: “Parallelogram for reading or displaying data”?“දත්ත කියවීම/පෙන්වීම සඳහා සමාන්තරාස්රය” යන්නෙන් අදහස් වන පදය කුමක්ද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C
Input/output symbol – Parallelogram for reading or displaying data.ආදාන/ප්රතිදාන සංකේතය – දත්ත කියවීම/පෙන්වීම සඳහා සමාන්තරාස්රය.
18Which term means: “Arrow showing the order of steps”?“පියවර පිළිවෙළ පෙන්වන ඊතලය” යන්නෙන් අදහස් වන පදය කුමක්ද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D
Flow line – Arrow showing the order of steps.ගැලීම් රේඛාව – පියවර පිළිවෙළ පෙන්වන ඊතලය.
19Which term means: “Small circle joining parts of a flowchart”?“ගැලීම් සටහනේ කොටස් යා කරන කුඩා කවය” යන්නෙන් අදහස් වන පදය කුමක්ද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B
Connector – Small circle joining parts of a flowchart.සම්බන්ධකය – ගැලීම් සටහනේ කොටස් යා කරන කුඩා කවය.
20Which term means: “Another name for a hand trace without a computer”?“පරිගණකයක් නැතිව අනුරේඛනයට තවත් නමක්” යන්නෙන් අදහස් වන පදය කුමක්ද?
✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: E
Dry run – Another name for a hand trace without a computer.වියළි ධාවනය – පරිගණකයක් නැතිව අනුරේඛනයට තවත් නමක්.
MCQ answer keyMCQ පිළිතුරු
- B – Decision.තීරණය.
- C – I/O.I/O.
- D – Terminal.අන්තය.
- B – Pseudocode.ව්යාජ කේතය.
- E – 45.45.
- E – Only 45.45 පමණි.
- A – Trace table.Trace table.
- C – Finite and clear.සීමිත, පැහැදිලි.
- A – Algorithm – Finite ordered unambiguous steps to solve a problem.ඇල්ගොරිතමය – ගැටලුවක් විසඳන සීමිත පිළිවෙළ පැහැදිලි පියවර.
- B – Flowchart – Diagram of an algorithm using standard symbols.ගැලීම් සටහන – සම්මත සංකේත භාවිත කරන ඇල්ගොරිතම රූපය.
- A – Pseudocode – Structured English description of an algorithm.ව්යාජ කේතය – ඇල්ගොරිතමයක ව්යුහගත ඉංග්රීසි විස්තරය.
- E – Hand trace – Working through an algorithm by hand to check values.අත් අනුරේඛනය – අගයන් පරීක්ෂාවට ඇල්ගොරිතමය අතින් ක්රියාත්මක කිරීම.
- D – Trace table – Table recording variable values during a trace.Trace table – අනුරේඛනයේදී විචල්ය අගයන් සටහන් කරන වගුව.
- D – Terminal symbol – Rounded box marking start or stop.අන්ත සංකේතය – ආරම්භය හෝ නැවතුම පෙන්වන රවුම් කොටුව.
- C – Process symbol – Rectangle for a calculation or assignment.සැකසුම් සංකේතය – ගණනය හෝ පැවරුම සඳහා සෘජුකෝණාස්රය.
- A – Decision symbol – Diamond with a yes/no condition.තීරණ සංකේතය – ඔව්/නැත කොන්දේසියක් සහිත දියමන්තිය.
- C – Input/output symbol – Parallelogram for reading or displaying data.ආදාන/ප්රතිදාන සංකේතය – දත්ත කියවීම/පෙන්වීම සඳහා සමාන්තරාස්රය.
- D – Flow line – Arrow showing the order of steps.ගැලීම් රේඛාව – පියවර පිළිවෙළ පෙන්වන ඊතලය.
- B – Connector – Small circle joining parts of a flowchart.සම්බන්ධකය – ගැලීම් සටහනේ කොටස් යා කරන කුඩා කවය.
- E – Dry run – Another name for a hand trace without a computer.වියළි ධාවනය – පරිගණකයක් නැතිව අනුරේඛනයට තවත් නමක්.
Structured Questionsව්යුහගත ප්රශ්න
1Draw and name five flowchart symbols.සංකේත පහ. (5 marksලකුණු 5)
Show model answerආදර්ශ පිළිතුර පෙන්වන්න
2Write pseudocode to find the largest of a list.විශාලතම pseudocode. (4 marksලකුණු 4)
Show model answerආදර්ශ පිළිතුර පෙන්වන්න
3Draw a flowchart to find the largest of a list.ගැලීම් සටහන. (6 marksලකුණු 6)
Show model answerආදර්ශ පිළිතුර පෙන්වන්න
4Complete a trace table for [12, 45, 7, 30].trace table. (5 marksලකුණු 5)
Show model answerආදර්ශ පිළිතුර පෙන්වන්න
5State three properties of a good algorithm.ගුණාංග තුනක්. (3 marksලකුණු 3)
Show model answerආදර්ශ පිළිතුර පෙන්වන්න
🎮 Game🎮 ක්රීඩා
Summary & Downloadsසාරාංශය සහ බාගත කිරීම්
Key pointsප්රධාන කරුණු
- An algorithm is a finite set of clear steps.ඇල්ගොරිතමය සීමිත පැහැදිලි පියවර ය.
- Flowcharts use standard symbols.ගැලීම් සටහන් සම්මත සංකේත භාවිත කරයි.
- Pseudocode is structured English.ව්යාජ කේතය ව්යුහගත ඉංග්රීසි ය.
- Trace tables check values by hand.Trace table අතින් අගයන් පරීක්ෂා කරයි.
- Trace before you code.කේතනයට පෙර අනුරේඛනය කරන්න.
Downloadsබාගත කිරීම්
Resource Book Lesson Note Download Questions Syllabus Sinhala LMS Simulator Tool
