Grade 10 · Unit 6 · ኢንፎርሜሽን ቴክኖሎጂ

Grade 10 Information Technology — Unit 6: Fundamentals Of Programming

የ10ኛ ክፍል ኢንፎርሜሽን ቴክኖሎጂ መጽሐፍ — ክፍል 6

Kitaaba teeknooloojii odeeffannoo kutaa 10 — Kutaa 6

Full Grade 10 IT textbook: all 6 units →

This page is an Abrari study guide for Unit 6 of Grade 10 Information Technology: Fundamentals Of Programming. Use the study-check questions, then try unofficial unit practice. Abrari is an independent study aid — not affiliated with the Ministry of Education, EAES, MoLS, or OCACC.

Study guide: Fundamentals Of Programming

Abrari study notes written from this unit (book pages 211–234) and checked against it. A study aid, not the textbook and not reviewed by a teacher.

This unit introduces the basic thinking behind programming. A computer only does what it is told, so before writing a program in a language such as Basic, C, C++, Java or Python, you must analyze the problem, break it into small tasks and write an algorithm: a precise, step-by-step method that turns input into output. The unit compares an algorithm to following a recipe for doro wot, lists the characteristics every algorithm must have (clear steps, well-defined inputs and outputs, finiteness, feasibility and language independence), and weighs its advantages and disadvantages. You then learn the two main ways to represent an algorithm: flowcharts, which use symbols joined by arrows, and pseudocode, which uses structured English-like statements. Loops and their four parts (initialization, computation, test and increment) are explained with examples such as adding natural numbers. Finally, the unit describes an Integrated Development Environment (IDE), its code editor, compiler and debugger, its benefits, and types such as Eclipse, NetBeans, Android Studio and cloud IDEs. These ideas form the base for every program you will write.

What you will learn

  • Explain what an algorithm is and how it moves from input through process to output.
  • Describe the characteristics, advantages and disadvantages of an algorithm.
  • Write simple algorithms for problems such as adding numbers or testing a number's sign.
  • Represent an algorithm using flowchart symbols and pseudocode.
  • Identify the four parts of a loop and trace a loop to its result.
  • Discuss the features, benefits and types of an Integrated Development Environment (IDE).

Solving problems with computers

Computers are called dumb machines because they only carry out the instructions they are given. To use one to solve a problem, you first analyze the problem carefully and split the solution into a sequence of small tasks. From that analysis you prepare an algorithm and write it in precise notation. Next the algorithm is turned into a program in a high-level language, the program is entered into the computer, and its instructions run one after another to give the expected result. Every task can be seen as input, process and output. For example, when a program adds two numbers A and B and keeps the answer in C, the values A and B are the input, adding them is the process, and the stored C is the output. Organizing a large program this way makes it much easier to implement.

What an algorithm is and its characteristics

An algorithm is a precise method for solving a problem made of clear, step-by-step instructions; once converted into code a computer can run, it becomes a program. It can also be described as a finite procedure that reaches a required result, or a sequence of steps that changes input into output. Cooking doro wot from a new recipe is a good comparison: you read each step and do them in order to get the dish. Not every list of instructions counts as an algorithm. It must be clear and unambiguous, with each step having one meaning; have well-defined inputs and outputs; be finite, never stuck in an endless loop; be feasible with available resources; and be language independent, so it works in any programming language. Algorithms are easy to understand and simple to convert into code, but they take time to write and show branching and looping poorly.

Examples of algorithms

Simple problems show how algorithms are written. To add two numbers: take the first number, take the second number, add them, then display the sum. To decide whether a number is positive, negative or zero: take the number; if it is less than 0, display negative; if it is greater than 0, display positive; otherwise display zero. This second example uses a decision, because the next step depends on a condition. To add ten natural numbers entered by a user: set the sum to 0 and a counter i to 1, take the ith number, add it to the sum, increase i by 1, and go back while numbers remain; at the end, output the sum. This third example uses a loop, because the same steps repeat until a condition tells the algorithm to stop.

Flowcharts and loops

Ordinary language is too loose for programming, so algorithms are written as flowcharts or pseudocode. A flowchart is a diagram of the main steps of a process, with each step in its own box and arrows showing the direction of flow. Common symbols stand for start and end (terminator), input and output, processing, decisions, predefined processes and flow lines. A decision box, for example, checks whether a number x is less than zero and sends the flow one way or the other. A loop is a set of instructions repeated until a condition is met. It has four parts: initialization sets starting values and the counter; computation does the processing; the test decides when to leave the loop, so it does not run forever; and increment prepares the next pass. Adding the first 50 natural numbers uses such a loop.

Pseudocode

Pseudocode is a design aid that does the same job as a flowchart, expressing the detailed logic of a program, but in English-like statements instead of drawings. It is useful when a flowchart cannot show the control flow clearly enough. Because there is no strict rule for writing it, you can describe the logic without worrying about the grammar of any particular programming language, using structured words for the main actions such as reading input, calculating and displaying output. Pseudocode serves two purposes: it guides the programmer when writing the real code, and it acts as documentation that others can review. Together, flowcharts, pseudocode and algorithms help reduce errors, cut the time spent debugging, and make logic errors easier to find.

Integrated Development Environments (IDEs)

Software runs in school computers, televisions, phones and tablets, and an IDE is an application that puts all the tools for creating it in one place. It joins editing source code, building executables and debugging under a single graphical interface. A code editor is a text editor designed to make writing code easier, a compiler turns human-readable source code into a form the computer can execute, and a debugger helps test and fix bugs. Some IDEs also have build automation tools, a class browser, an object browser and a class hierarchy diagram. IDEs raise productivity through faster setup, faster development tasks with instant syntax checking, continual learning and standardization of how teams work. Types include multi-language IDEs like Eclipse and NetBeans, mobile IDEs like Android Studio and Visual Studio, HTML IDEs like DreamWeaver, and cloud IDEs like Nitrous.

Key terms

Algorithm
A precise, finite method of solving a problem using clear step-by-step instructions.
Program
An algorithm converted into code so that a computer can execute it.
Input, process, output
The three stages of an algorithm: data taken in, the work done on it, and the result produced.
Finiteness
The characteristic that an algorithm must end after a limited number of steps and not loop forever.
Language independent
The characteristic that an algorithm can be written in any programming language and still give the same output.
Flowchart
A graphical representation of an algorithm that shows steps in boxes connected by arrows.
Pseudocode
A design aid that expresses a program's logic in structured English-like statements.
Loop
A sequence of instructions repeated until a specific condition occurs.
Integrated Development Environment (IDE)
An application that gathers the tools for writing, building and debugging software into one interface.
Code editor
A text editor designed to make writing and editing source code easier.
Compiler
A tool that changes human-readable source code into a form a computer can execute.
Debugger
A tool used during testing to find and fix errors in a program.

Worked example

Write an algorithm that uses a loop to find the sum of the first ten natural numbers (1 + 2 + ... + 10), name the four parts of the loop, and trace it to find the result.

  1. Initialization: set sum = 0 and counter = 1.
  2. Test: if counter is less than or equal to 10, continue to the computation; otherwise leave the loop and go to the output step.
  3. Computation: add counter to sum (sum = sum + counter).
  4. Increment: increase counter by 1 and go back to the test.
  5. Trace the running sum as counter goes from 1 to 10: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55. When counter becomes 11 the test fails and the loop stops.
  6. Output: display the sum.

Answer: The algorithm displays 55, the sum of the first ten natural numbers.

Check your understanding

  1. Why must an algorithm be finite?

    Show answer

    If it never ends, for example by getting stuck in an infinite loop, it can never produce its output, so it would not solve the problem.

  2. What does it mean that an algorithm is language independent?

    Show answer

    It is written as plain instructions that can be coded in any programming language, and every version gives the same expected output.

  3. In a loop, what would happen without the test part?

    Show answer

    The loop would have no way to exit, so the program would repeat the steps endlessly.

  4. When might a programmer choose pseudocode instead of a flowchart?

    Show answer

    When a flowchart cannot show the program's control flow and detailed logic clearly enough, pseudocode can describe it in English-like statements.

  5. How does an IDE make a programmer more productive?

    Show answer

    It puts the code editor, compiler and debugger in one place, so there is less setup and switching between tools, and it can check syntax while code is being typed.

Common mistakes

  • Thinking an algorithm belongs to one programming language, when it is a plain set of steps that any language can implement.
  • Writing a loop without a proper test or without increasing the counter, which makes the loop run forever.
  • Putting the stages in the wrong order; an algorithm runs input first, then process, then output.

Frequently asked questions

Is this the Grade 10 Information Technology Unit 6 textbook chapter?
Yes. This page is Unit 6 (“Fundamentals Of Programming”) of the Ethiopian new-curriculum Grade 10 Information Technology student textbook (10ኛ ክፍል ኢንፎርሜሽን ቴክኖሎጂ የተማሪ መጽሐፍ). Abrari credits the issuing bureau or the Ministry of Education as publisher of the classroom book and is not affiliated with MoE, EAES, MoLS, or OCACC.
How do I practice Grade 10 Information Technology Unit 6?
Read the unit in the on-site reader, then open unofficial Information Technology practice on Abrari. Explanations do not require an account. Answers are unofficial.
How do I study Grade 10 Information Technology Unit 6?
Use the study-check questions on this page, then open unofficial practice when it is listed. Abrari does not offer a download.
Is Abrari official?
No — Abrari is an independent study aid, not affiliated with, endorsed by, or an official product of the Ethiopian Ministry of Education (MoE), EAES, MoLS, or OCACC.

No mapped EUEE topic for this unit yet. Browse the subject hub, or read the full textbook.

All Information Technology EUEE topics

Other units in this book