Flowcharts and Pseudocode – Grade 11 ICT Notes 1.3

© 2026 schoolict.net (Ruwan Mangala Suraweera)

1.3 Flowcharts and Pseudocodeගැලීම් සටහන් සහ ව්‍යාජ කේත

G.C.E. O/L Grade 11 ICT · Lesson 1G.C.E. O/L ICT · 11 ශ්‍රේණිය · පාඩම 1

Prints all tabs in the language you are reading. Use “Save as PDF” in the print window to keep a copy.ඔබ කියවන භාෂාවෙන් සියලු tabs මුද්‍රණය වේ. පිටපතක් තියාගන්න print window එකේ “Save as PDF” තෝරන්න.
🎬Video coming soon in this language. Switch language to watch the other video.මේ භාෂාවෙන් වීඩියෝව ඉක්මනින් එනවා. අනෙක් වීඩියෝව බලන්න භාෂාව මාරු කරන්න.

In this videoමේ වීඩියෝවේ

  • Flowcharts use standard symbols.ගැලීම් සටහන් සම්මත සංකේත භාවිත කරයි.
  • Oval = Start/Stop; parallelogram = input/output.ඕවලය = Start/Stop; සමාන්තරාස්‍රය = ආදාන/ප්‍රතිදාන.
  • Rectangle = process; diamond = decision.සෘජුකෝණාස්‍රය = සැකසීම; දියමන්තිය = තීරණය.
  • Pseudocode uses words like INPUT, IF, FOR.ව්‍යාජ කේතය INPUT, IF, FOR වැනි වචන භාවිත කරයි.
  • A trace table checks an algorithm by hand.අනුරේඛන වගුව අතින් ඇල්ගොරිතමය පරීක්ෂා කරයි.
FlowchartPseudocodeTerminalDecisionProcessTrace tableFlow line

Notesසටහන්

Syllabus 10.3. We show an algorithm in two main ways. A flowchart is a picture made of standard symbols joined by arrows. Pseudocode is the algorithm written in short English-like lines, close to a real program. In this note you will learn the O/L flowchart symbols, the pseudocode words, how to change one into the other, and how to check an algorithm with a trace table.විෂය නිර්දේශය 10.3. ඇල්ගොරිතමයක් ප්‍රධාන ක්‍රම දෙකකින් පෙන්වමු. ගැලීම් සටහනක් (flowchart) යනු ඊතලවලින් සම්බන්ධ කළ සම්මත සංකේතවලින් සෑදූ රූපයකි. ව්‍යාජ කේතය (pseudocode) යනු සැබෑ වැඩසටහනකට සමීප, කෙටි ඉංග්‍රීසි වැනි පේළිවලින් ලියූ ඇල්ගොරිතමයයි. මෙම සටහනෙන් O/L ගැලීම් සටහන් සංකේත, ව්‍යාජ කේත වචන, එකක් අනෙකට පරිවර්තනය කරන ආකාරය සහ අනුරේඛන වගුවකින් (trace table) ඇල්ගොරිතමයක් පරීක්ෂා කරන ආකාරය ඉගෙන ගනිමු.

1. Flowchart symbols1. ගැලීම් සටහන් සංකේත

Start / StopTerminalINPUT / DISPLAYInput / OutputTotal = A + BProcessMark >= 35?DecisionAConnectorFlow line
Standard flowchart symbols used in Sri Lankan O/L papersශ්‍රී ලංකා O/L ප්‍රශ්න පත්‍රවල භාවිත සම්මත ගැලීම් සටහන් සංකේත
SymbolසංකේතයNameනමUsed forභාවිතය
Rounded rectangle (oval)වටකුරු සෘජුකෝණාස්‍රය (ඕවලය)Terminalආරම්භ/අවසානStart and Stopආරම්භය සහ නැවතීම
Parallelogramසමාන්තරාස්‍රයInput / Outputආදාන / ප්‍රතිදානINPUT, DISPLAY, PRINTINPUT, DISPLAY, PRINT
Rectangleසෘජුකෝණාස්‍රයProcessක්‍රියාවලියCalculations, Total = A + Bගණනය කිරීම්, Total = A + B
Diamondදියමන්තිය (රොම්බසය)DecisionතීරණයA Yes/No question, e.g. Mark >= 35?ඔව්/නැත ප්‍රශ්නයක්, උදා Mark >= 35?
Small circleකුඩා රවුමConnectorසම්බන්ධකයJoining flow linesගැලීම් රේඛා සම්බන්ධ කිරීම
ArrowඊතලයFlow lineගැලීම් රේඛාවShows the direction of the stepsපියවරවල දිශාව පෙන්වයි
💡 Rules for a neat flowchart: one Start and one Stop; arrows go top to bottom; a decision diamond has exactly two exits labelled Yes and No; write short text inside each box.පිළිවෙළ ගැලීම් සටහනක නීති: එක් ආරම්භයක් සහ එක් නැවතීමක්; ඊතල ඉහළ සිට පහළට; තීරණ දියමන්තියකට ඔව් සහ නැත ලෙස ලේබල් කළ හරියටම පිටවීම් දෙකක්; එක් එක් කොටුව තුළ කෙටි පාඨයක් ලියන්න.

2. Pseudocode words2. ව්‍යාජ කේත වචන

Pseudocode is not a real language, so small differences are allowed. But in O/L answers we normally use these words, written in CAPITALS:ව්‍යාජ කේතය සැබෑ භාෂාවක් නොවන නිසා කුඩා වෙනස්කම් පිළිගැනේ. නමුත් O/L පිළිතුරුවල සාමාන්‍යයෙන් ලොකු අකුරින් ලියන මෙම වචන භාවිත කරමු:

WordවචනයMeaningතේරුමFlowchart symbolගැලීම් සටහන් සංකේතය
BEGIN / ENDBEGIN / ENDStart and end of the algorithmඇල්ගොරිතමයේ ආරම්භය සහ අවසානයTerminalආරම්භ/අවසාන
INPUT / READINPUT / READGet dataදත්ත ලබා ගැනීමInput/Outputආදාන/ප්‍රතිදාන
DISPLAY / PRINTDISPLAY / PRINTShow a resultප්‍රතිඵලයක් පෙන්වීමInput/Outputආදාන/ප්‍රතිදාන
Total = A + BTotal = A + BCalculate and storeගණනය කර ගබඩා කිරීමProcessක්‍රියාවලිය
IF … THEN … ELSE … ENDIFIF … THEN … ELSE … ENDIFSelectionවරණයDecisionතීරණය
FOR … ENDFOR, WHILE … ENDWHILE, REPEAT … UNTILFOR … ENDFOR, WHILE … ENDWHILE, REPEAT … UNTILIterationපුනරාවර්තනයDecision + arrow going backතීරණය + ආපසු යන ඊතලය

3. Example: the larger of two numbers3. උදාහරණය: සංඛ්‍යා දෙකකින් විශාල එක

Look at the three forms below. Every flowchart box matches one pseudocode line, and every pseudocode line matches one or two lines of code.පහත ආකාර තුන බලන්න. සෑම ගැලීම් සටහන් කොටුවක්ම ව්‍යාජ කේත පේළියකට ද, සෑම ව්‍යාජ කේත පේළියක්ම කේත පේළි එකකට හෝ දෙකකට ද ගැළපේ.

📝 Pseudocodeව්‍යාජ කේතය (Pseudocode)

BEGIN
  INPUT A, B
  IF A > B THEN
    DISPLAY A
  ELSE
    DISPLAY B
  ENDIF
END
StartINPUT A, BA > B?DISPLAY AYesDISPLAY BNoStop
Flowchart – Largest of two numbersගැලීම් සටහන – සංඛ්‍යා දෙකකින් විශාලතම
💻 Largest of two numbersසංඛ්‍යා දෙකකින් විශාලතම
program Largest2;
var
  a, b: integer;
begin
  write('Enter first number: ');
  readln(a);
  write('Enter second number: ');
  readln(b);
  if a > b then
    writeln('Largest = ', a)
  else
    writeln('Largest = ', b);
end.
a = int(input("Enter first number: "))
b = int(input("Enter second number: "))
if a > b:
    print("Largest =", a)
else:
    print("Largest =", b)

▶ Sample runනියැදි ධාවනය 1 · same output in Pascal and Python (typed input in yellow)Pascal සහ Python දෙකෙහිම එකම ප්‍රතිදානය (ටයිප් කළ ආදානය කහ පාටින්)

Enter first number: 45
Enter second number: 72
Largest = 72

▶ Sample runනියැදි ධාවනය 2 · same output in Pascal and Python (typed input in yellow)Pascal සහ Python දෙකෙහිම එකම ප්‍රතිදානය (ටයිප් කළ ආදානය කහ පාටින්)

Enter first number: 90
Enter second number: 34
Largest = 90

4. Converting a flowchart into pseudocode4. ගැලීම් සටහනක් ව්‍යාජ කේතයට පරිවර්තනය

1
Terminal → BEGIN / ENDStart becomes BEGIN, Stop becomes END.
ආරම්භ/අවසාන → BEGIN / ENDStart → BEGIN, Stop → END.
2
Parallelogram → INPUT / DISPLAYCopy the text inside.
සමාන්තරාස්‍රය → INPUT / DISPLAYඇතුළත පාඨය පිටපත් කරන්න.
3
Rectangle → assignmente.g. Sum = Sum + i
සෘජුකෝණාස්‍රය → පැවරීමඋදා Sum = Sum + i
4
Diamond, no arrow back → IFYes side after THEN, No side after ELSE, then ENDIF.
ආපසු ඊතලයක් නැති දියමන්තිය → IFඔව් පැත්ත THEN ට පසුව, නැත පැත්ත ELSE ට පසුව, පසුව ENDIF.
5
Diamond with an arrow back → loopSteps inside the loop go between WHILE and ENDWHILE.
ආපසු ඊතලයක් ඇති දියමන්තිය → ලූපයලූපය තුළ පියවර WHILE සහ ENDWHILE අතර.

Converting pseudocode into a flowchart is the same table read backwards: draw one symbol for each line, and draw an arrow back to the diamond for every loop.ව්‍යාජ කේතය ගැලීම් සටහනකට පරිවර්තනය කිරීම එම වගුවම පසුපසට කියවීමයි: සෑම පේළියකටම එක් සංකේතයක් අඳින්න, සෑම ලූපයකටම දියමන්තියට ආපසු ඊතලයක් අඳින්න.

5. Example with a loop: sum of 1 to N5. ලූපයක් සහිත උදාහරණය: 1 සිට N දක්වා එකතුව

📝 Pseudocodeව්‍යාජ කේතය (Pseudocode)

BEGIN
  INPUT N
  Total = 0
  i = 1
  WHILE i <= N DO
    Total = Total + i
    i = i + 1
  ENDWHILE
  DISPLAY Total
END
StartINPUT NTotal = 0, i = 1i <= N?YesTotal = Total + ii = i + 1NoDISPLAY TotalStop
Flowchart – Sum of the numbers 1 to Nගැලීම් සටහන – 1 සිට N දක්වා සංඛ්‍යාවල එකතුව
💻 Sum of the numbers 1 to N1 සිට N දක්වා සංඛ්‍යාවල එකතුව
program SumToN;
var
  n, i, total: integer;
begin
  write('Enter N: ');
  readln(n);
  total := 0;
  i := 1;
  while i <= n do
  begin
    total := total + i;
    i := i + 1;
  end;
  writeln('Sum = ', total);
end.
n = int(input("Enter N: "))
total = 0
i = 1
while i <= n:
    total = total + i
    i = i + 1
print("Sum =", total)

▶ Sample runනියැදි ධාවනය · same output in Pascal and Python (typed input in yellow)Pascal සහ Python දෙකෙහිම එකම ප්‍රතිදානය (ටයිප් කළ ආදානය කහ පාටින්)

Enter N: 5
Sum = 15

6. Trace tables (dry run)6. අනුරේඛන වගු (dry run)

A trace table shows the value of each variable after every step. Doing this on paper is called a dry run. It helps you find mistakes before running the program. Here is the trace of the program above for N = 5:අනුරේඛන වගුවක් සෑම පියවරකටම පසු එක් එක් විචල්‍යයේ අගය පෙන්වයි. මෙය කඩදාසියේ කිරීම dry run ලෙස හැඳින්වේ. වැඩසටහන ධාවනයට පෙර වැරදි සොයා ගැනීමට එය උපකාරී වේ. N = 5 සඳහා ඉහත වැඩසටහනේ අනුරේඛනය මෙන්න:

StepපියවරiiTotalTotali <= 5 ?i <= 5 ?
startstart1100––
looploop1111Yesඔව්
looploop2233Yesඔව්
looploop3366Yesඔව්
looploop441010Yesඔව්
looploop551515Yesඔව්
checkcheck661515Noනැත

The last row shows i = 6, so the condition i <= 5 is No and the loop stops. Total = 15, which matches the real output “Sum = 15”.අවසාන පේළියේ i = 6 නිසා i <= 5 කොන්දේසිය නැත වී ලූපය නවතී. Total = 15, එය සැබෑ ප්‍රතිදානය වන “Sum = 15” ට ගැළපේ.

7. Try it: trace this loop7. උත්සාහ කරන්න: මෙම ලූපය අනුරේඛනය කරන්න

📝 Pseudocodeව්‍යාජ කේතය (Pseudocode)

BEGIN
  S = 0
  X = 1
  WHILE X < 10 DO
    S = S + X
    X = X + 3
  ENDWHILE
  DISPLAY S, X
END
StartS = 0, X = 1X < 10?YesS = S + XX = X + 3NoDISPLAY S, XStop
Flowchart – Trace this loopගැලීම් සටහන – මෙම loop එක trace කරන්න
StepපියවරSSXXX < 10 ?X < 10 ?
startstart0011––
looploop1144Yesඔව්
looploop5577Yesඔව්
looploop12121010Yesඔව්
checkcheck12121010Noනැත

Output: 12 10 (S = 12, X = 10). Check: 1 + 4 + 7 = 12.ප්‍රතිදානය: 12 10 (S = 12, X = 10). පරීක්ෂාව: 1 + 4 + 7 = 12.

Key Wordsප්‍රධාන පද

Flowchartගැලීම් සටහන
A diagram of an algorithm using standard symbols and arrows.සම්මත සංකේත සහ ඊතල භාවිතයෙන් ඇල්ගොරිතමයක රූප සටහනක්.
Pseudocodeව්‍යාජ කේතය
An algorithm written in short English-like lines.කෙටි ඉංග්‍රීසි වැනි පේළිවලින් ලියූ ඇල්ගොරිතමයක්.
Terminal symbolආරම්භ/අවසාන සංකේතය
Rounded rectangle for Start and Stop.Start සහ Stop සඳහා වටකුරු සෘජුකෝණාස්‍රය.
Input/Output symbolආදාන/ප්‍රතිදාන සංකේතය
Parallelogram for INPUT and DISPLAY.INPUT සහ DISPLAY සඳහා සමාන්තරාස්‍රය.
Process symbolක්‍රියාවලි සංකේතය
Rectangle for a calculation or assignment.ගණනය හෝ පැවරීමක් සඳහා සෘජුකෝණාස්‍රය.
Decision symbolතීරණ සංකේතය
Diamond for a Yes/No question.ඔව්/නැත ප්‍රශ්නයක් සඳහා දියමන්තිය.
Connectorසම්බන්ධකය
Small circle that joins flow lines.ගැලීම් රේඛා සම්බන්ධ කරන කුඩා රවුම.
Flow lineගැලීම් රේඛාව
Arrow showing the order of steps.පියවරවල පිළිවෙළ පෙන්වන ඊතලය.
Trace tableඅනුරේඛන වගුව
A table showing variable values after each step.සෑම පියවරකටම පසු විචල්‍ය අගයන් පෙන්වන වගුවක්.
Dry runDry run
Following an algorithm by hand on paper.කඩදාසියේ අතින් ඇල්ගොරිතමයක් අනුගමනය කිරීම.
Assignmentපැවරීම
Storing a value in a variable, e.g. Total = 0.විචල්‍යයක අගයක් ගබඩා කිරීම, උදා Total = 0.
Conversionපරිවර්තනය
Changing a flowchart into pseudocode or the reverse.ගැලීම් සටහනක් ව්‍යාජ කේතයට හෝ අනෙක් පසට වෙනස් කිරීම.

Sample Q&Aආදර්ශ ප්‍රශ්න සහ පිළිතුරු

1Which symbol is used for a decision?තීරණයක් සඳහා භාවිත කරන සංකේතය කුමක්ද?

Answerපිළිතුර: A diamond with Yes and No exits.ඔව් සහ නැත පිටවීම් ඇති දියමන්තිය.

2Which symbol is used for INPUT and DISPLAY?INPUT සහ DISPLAY සඳහා භාවිත කරන සංකේතය කුමක්ද?

Answerපිළිතුර: The parallelogram.සමාන්තරාස්‍රය.

3What is pseudocode?ව්‍යාජ කේතය යනු කුමක්ද?

Answerපිළිතුර: An algorithm written in short English-like lines, close to a program.වැඩසටහනකට සමීප කෙටි ඉංග්‍රීසි වැනි පේළිවලින් ලියූ ඇල්ගොරිතමයකි.

4How do you know a diamond is part of a loop?දියමන්තියක් ලූපයක කොටසක් බව දැනගන්නේ කෙසේද?

Answerපිළිතුර: An arrow comes back up to it from below.පහළ සිට එයට ආපසු ඉහළට ඊතලයක් පැමිණේ.

5What is a trace table used for?අනුරේඛන වගුවක් භාවිත කරන්නේ කුමකටද?

Answerපිළිතුර: To record variable values step by step and find mistakes (dry run).විචල්‍ය අගයන් පියවරෙන් පියවර සටහන් කර වැරදි සොයා ගැනීමට (dry run).

6Trace S = 0, X = 1; WHILE X < 10: S = S + X, X = X + 3. Give the final S and X.S = 0, X = 1; WHILE X < 10: S = S + X, X = X + 3 අනුරේඛනය කරන්න. අවසාන S සහ X දෙන්න.

Answerපිළිතුර: S = 12, X = 10.S = 12, X = 10.

MCQබහුවරණ ප්‍රශ්න

Choose the correct answer for each question.සෑම ප්‍රශ්නයකටම නිවැරදි පිළිතුර තෝරන්න.

Scoreලකුණු: 0 / 15

1The flowchart symbol for Start and Stop is the…Start සහ Stop සඳහා ගැලීම් සටහන් සංකේතය…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

Terminal = rounded.Terminal = වටකුරු.

2“Total = A + B” is drawn in a…“Total = A + B” අඳින්නේ…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

Calculation = process.ගණනය = ක්‍රියාවලිය.

3“DISPLAY Total” is drawn in a…“DISPLAY Total” අඳින්නේ…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

Output = parallelogram.ප්‍රතිදානය = සමාන්තරාස්‍රය.

4How many exits does a decision diamond have?තීරණ දියමන්තියකට පිටවීම් කීයක් තිබේද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

Yes and No.ඔව් සහ නැත.

5A small circle in a flowchart is a…ගැලීම් සටහනක කුඩා රවුමක්…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

Connector.සම්බන්ධකය.

6Pseudocode is…ව්‍යාජ කේතය…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

Not run by computer.පරිගණකය ධාවනය නොකරයි.

7A diamond with an arrow coming back to it shows…ආපසු ඊතලයක් පැමිණෙන දියමන්තියක් පෙන්වන්නේ…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

Arrow back = repeat.ආපසු ඊතලය = පුනරාවර්තනය.

8Following an algorithm by hand on paper is called a…කඩදාසියේ අතින් ඇල්ගොරිතමයක් අනුගමනය කිරීම හඳුන්වන්නේ…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

Dry run.Dry run.

9In the sum 1 to N program with N = 5, the output is…N = 5 සමඟ 1 සිට N දක්වා එකතු කරන වැඩසටහනේ ප්‍රතිදානය…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

1+2+3+4+5 = 15.1+2+3+4+5 = 15.

10In that program, the value of i when the loop stops is…එම වැඩසටහනේ ලූපය නවතින විට i හි අගය…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

Stops when i <= 5 is false.i <= 5 අසත්‍ය වූ විට නවතී.

11For inputs 45 and 72, the larger-number program displays…45 සහ 72 ආදාන සඳහා විශාල සංඛ්‍යා වැඩසටහන පෙන්වන්නේ…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

72 > 45.72 > 45.

12Trace: S = 0, X = 1; WHILE X < 10: S = S + X; X = X + 3. Output “S X” is…අනුරේඛනය: S = 0, X = 1; WHILE X < 10: S = S + X; X = X + 3. ප්‍රතිදානය “S X”…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: C

S=1,5,12; X=4,7,10.S=1,5,12; X=4,7,10.

13When converting a flowchart, the Stop terminal becomes…ගැලීම් සටහනක් පරිවර්තනයේදී Stop terminal එක වන්නේ…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: A

Stop → END.Stop → END.

14The Yes branch of a decision (no loop) goes after…තීරණයක (ලූපයක් නැති) ඔව් ශාඛාව යන්නේ…

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: D

IF cond THEN yes ELSE no.IF cond THEN ඔව් ELSE නැත.

15Which is a rule for a good flowchart?හොඳ ගැලීම් සටහනක නීතියක් කුමක්ද?

✔ Correct!නිවැරදියි!✘ Not quite.වැරදියි. Correct answerනිවැරදි පිළිතුර: B

One Start, one Stop.එක් Start, එක් Stop.

MCQ answer keyMCQ පිළිතුරු

  1. A – Terminal = rounded.Terminal = වටකුරු.
  2. C – Calculation = process.ගණනය = ක්‍රියාවලිය.
  3. A – Output = parallelogram.ප්‍රතිදානය = සමාන්තරාස්‍රය.
  4. B – Yes and No.ඔව් සහ නැත.
  5. C – Connector.සම්බන්ධකය.
  6. D – Not run by computer.පරිගණකය ධාවනය නොකරයි.
  7. C – Arrow back = repeat.ආපසු ඊතලය = පුනරාවර්තනය.
  8. D – Dry run.Dry run.
  9. B – 1+2+3+4+5 = 15.1+2+3+4+5 = 15.
  10. A – Stops when i <= 5 is false.i <= 5 අසත්‍ය වූ විට නවතී.
  11. B – 72 > 45.72 > 45.
  12. C – S=1,5,12; X=4,7,10.S=1,5,12; X=4,7,10.
  13. A – Stop → END.Stop → END.
  14. D – IF cond THEN yes ELSE no.IF cond THEN ඔව් ELSE නැත.
  15. B – One Start, one Stop.එක් Start, එක් Stop.

Structured Questionsව්‍යුහගත ප්‍රශ්න

1Draw the flowchart symbols for (i) terminal (ii) input/output (iii) process (iv) decision and say what each is used for. (4 marks)(i) terminal (ii) ආදාන/ප්‍රතිදාන (iii) ක්‍රියාවලිය (iv) තීරණය සඳහා ගැලීම් සටහන් සංකේත ඇඳ, එක් එකක් භාවිත කරන්නේ කුමකටදැයි සඳහන් කරන්න. (ලකුණු 4) (4 marksලකුණු 4)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
Rounded rectangle – Start/Stop; parallelogram – INPUT/DISPLAY; rectangle – calculation/assignment; diamond – Yes/No question (1 each).වටකුරු සෘජුකෝණාස්‍රය – Start/Stop; සමාන්තරාස්‍රය – INPUT/DISPLAY; සෘජුකෝණාස්‍රය – ගණනය/පැවරීම; දියමන්තිය – ඔව්/නැත ප්‍රශ්නය (එකට 1).

2Write pseudocode to input two numbers and display the larger one. (4 marks)සංඛ්‍යා දෙකක් ආදානය කර විශාල එක පෙන්වන ව්‍යාජ කේතය ලියන්න. (ලකුණු 4) (4 marksලකුණු 4)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
BEGIN; INPUT A, B; IF A > B THEN Largest = A ELSE Largest = B ENDIF; DISPLAY Largest; END (input 1, IF 2, display 1).BEGIN; INPUT A, B; IF A > B THEN Largest = A ELSE Largest = B ENDIF; DISPLAY Largest; END (ආදානය 1, IF 2, පෙන්වීම 1).

📝 Pseudocodeව්‍යාජ කේතය (Pseudocode)

BEGIN
  INPUT A, B
  IF A > B THEN
    DISPLAY A
  ELSE
    DISPLAY B
  ENDIF
END

3Draw a flowchart to find the sum of the numbers 1 to N. (5 marks)1 සිට N දක්වා සංඛ්‍යාවල එකතුව සොයන ගැලීම් සටහනක් අඳින්න. (ලකුණු 5) (5 marksලකුණු 5)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
Start; input N; Total = 0, i = 1; diamond i <= N?; Yes → Total = Total + i, i = i + 1, arrow back; No → display Total; Stop (1 each for start/stop, input, initialise, loop with arrow back, display).Start; N ආදානය; Total = 0, i = 1; දියමන්තිය i <= N?; ඔව් → Total = Total + i, i = i + 1, ආපසු ඊතලය; නැත → Total පෙන්වීම; Stop (ආරම්භ/අවසාන, ආදානය, ආරම්භක අගය, ආපසු ඊතලය සහිත ලූපය, පෙන්වීම එකට 1).
StartINPUT NTotal = 0, i = 1i <= N?YesTotal = Total + ii = i + 1NoDISPLAY TotalStop
Flowchart – Sum of the numbers 1 to Nගැලීම් සටහන – 1 සිට N දක්වා සංඛ්‍යාවල එකතුව

4Complete a trace table for S = 0, X = 1; WHILE X < 10: S = S + X; X = X + 3; DISPLAY S, X. (4 marks)S = 0, X = 1; WHILE X < 10: S = S + X; X = X + 3; DISPLAY S, X සඳහා අනුරේඛන වගුවක් සම්පූර්ණ කරන්න. (ලකුණු 4) (4 marksලකුණු 4)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
S: 0, 1, 5, 12; X: 1, 4, 7, 10; condition Yes, Yes, Yes, No; output 12 10 (1 each).S: 0, 1, 5, 12; X: 1, 4, 7, 10; කොන්දේසිය ඔව්, ඔව්, ඔව්, නැත; ප්‍රතිදානය 12 10 (එකට 1).
StepපියවරSSXXX < 10 ?X < 10 ?
startstart0011––
looploop1144Yesඔව්
looploop5577Yesඔව්
looploop12121010Yesඔව්
checkcheck12121010Noනැත

5Give two advantages of pseudocode over a flowchart, and one advantage of a flowchart. (3 marks)ගැලීම් සටහනකට වඩා ව්‍යාජ කේතයේ වාසි දෙකක් සහ ගැලීම් සටහනක එක් වාසියක් දෙන්න. (ලකුණු 3) (3 marksලකුණු 3)

Show model answerආදර්ශ පිළිතුර පෙන්වන්න
Pseudocode: quicker to write and change; closer to real code (2). Flowchart: easy to see the flow as a picture (1).ව්‍යාජ කේතය: ලිවීමට සහ වෙනස් කිරීමට ඉක්මන්; සැබෑ කේතයට සමීප (2). ගැලීම් සටහන: රූපයක් ලෙස ගැලීම පහසුවෙන් පෙනේ (1).

🎮 Game🎮 ක්‍රීඩා

Pick a game. Each one uses words from this lesson.ක්‍රීඩාවක් තෝරන්න. හැම එකක්ම මේ පාඩමේ වචන පාවිච්චි කරනවා.

Summary & Downloadsසාරාංශය සහ බාගත කිරීම්

Key pointsප්‍රධාන කරුණු

  • Flowchart = picture; pseudocode = English-like lines.ගැලීම් සටහන = රූපය; ව්‍යාජ කේතය = ඉංග්‍රීසි වැනි පේළි.
  • Terminal (rounded) = Start/Stop.Terminal (වටකුරු) = Start/Stop.
  • Parallelogram = input/output.සමාන්තරාස්‍රය = ආදාන/ප්‍රතිදාන.
  • Rectangle = process; diamond = decision.සෘජුකෝණාස්‍රය = ක්‍රියාවලිය; දියමන්තිය = තීරණය.
  • A diamond has Yes and No exits.දියමන්තියකට ඔව් සහ නැත පිටවීම් ඇත.
  • Arrow back to a diamond = loop.දියමන්තියට ආපසු ඊතලය = ලූපය.
  • Convert box by box, line by line.කොටුවෙන් කොටුව, පේළියෙන් පේළිය පරිවර්තනය කරන්න.
  • A trace table checks an algorithm (dry run).අනුරේඛන වගුවක් ඇල්ගොරිතමයක් පරීක්ෂා කරයි (dry run).

Downloadsබාගත කිරීම්

Full Lesson 1 PDFසම්පූර්ණ පාඩම 1 PDF: English · සිංහල

Next noteඊළඟ සටහන 1.4 →

© 2026 schoolict.net (Ruwan Mangala Suraweera). All rights reserved.සියලු හිමිකම් ඇවිරිණි.