top of page

Lesson Notes

Programming

Grade

11

Term

1

This lesson is all about learning to think like a computer programmer. The goal is to break down a problem into simple, logical steps that a computer can follow.

Short Notes

  • Problem Analysis: Every problem has three parts:

    • Input: The data or materials you start with (e.g., two numbers to add).

    • Process: The steps you take to solve the problem (e.g., the action of adding).

    • Output: The final result (e.g., the sum).

  • Algorithm: An algorithm is a clear, step-by-step plan for solving a problem.

  • Control Structures: These are the building blocks of algorithms.

    • Sequence: Steps are performed one after another in a strict order.

    • Selection: A decision is made. If a condition is true, one path is taken; if not, another path is taken (e.g., IF...THEN...ELSE).

    • Repetition (Iteration): A set of steps is repeated until a condition is met (e.g., WHILE something is true, REPEAT a task UNTIL a goal is reached).

  • Flowcharts: A visual way to represent an algorithm using standard symbols.

  • Pseudo-code: Writing out the steps of an algorithm in simple English-like statements before writing it in a real programming language.

  • Pascal Basics:

    • Identifier: A name you give to something, like a variable (e.g., student_name).

    • Variable: A placeholder for a value that can change (e.g., total_marks).

    • Constant: A value that does not change (e.g., pi = 3.14).

    • Data Types: Integer (whole numbers), Real (decimal numbers), Char (a single character like 'A'), String (text like "Hello"), Boolean (True or False).

Important Points for the Exam

  • Memorize the flowchart symbols! You will likely be asked to draw a simple flowchart or interpret one.

  • Understand the three Control Structures. Be able to identify which one is being used in a given problem (Sequence, Selection, or Repetition).

  • For Selection, know the difference between a simple IF...THEN and an IF...THEN...ELSE structure.

  • For Repetition, understand when to use a FOR loop (when you know the number of repeats) versus a WHILE loop (when you don't).

  • You don't need to be a Pascal expert, but you should be able to read a simple piece of code and identify variables, data types, and what the code is trying to achieve.

Tips & Tricks for Studying

  • Practice with Everyday Tasks: Write the algorithm and draw a flowchart for making a cup of tea or calculating your bus fare. This makes the concepts easier to understand.

  • Trace the Code: When you see a piece of Pascal code, pretend you are the computer. Write down the variables and track how their values change line by line.

  • Think Logically: Programming questions are logic puzzles. Read the question carefully to understand the required inputs, the exact process, and the desired output before you start designing a solution.

වියාචනය (Disclaimer)

Idasara Academy ඉගෙනුම් සම්පත් නිර්මාණය කර ඇත්තේ සිසුන්ට මගපෙන්වීම, පුහුණුව සහ අධ්‍යයන උපායමාර්ග ලබාදී සහයෝගය දැක්වීමටය.

කෙසේ වෙතත්, සියලුම විභාග සහ නිල අවශ්‍යතා සඳහා, සිසුන් අනිවාර්යයෙන්ම ශ්‍රී ලංකා අධ්‍යාපන අමාත්‍යාංශයේ, අධ්‍යාපන ප්‍රකාශන දෙපාර්තමේන්තුව විසින් ප්‍රකාශයට පත් කරන ලද නිල පෙළපොත් සහ සම්පත් පරිශීලනය කළ යුතුය.

ජාතික විභාග සඳහා අන්තර්ගතයේ නිල බලය ලත් මූලාශ්‍රය වනුයේ රජය විසින් නිකුත් කරනු ලබන මෙම ප්‍රකාශනයි.

bottom of page