This document introduces algorithms and flowcharts as step-by-step procedures for problem-solving, emphasizing their simplicity and adaptability to programming languages. It outlines the characteristics of algorithms, including input, output, definiteness, finiteness, and uniqueness, and provides examples of algorithms for making tea and calculating the sum of two numbers. Additionally, it includes exercises to reinforce understanding of algorithm development and characteristics.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
6 views9 pages
VIII - Chapter 2.1
This document introduces algorithms and flowcharts as step-by-step procedures for problem-solving, emphasizing their simplicity and adaptability to programming languages. It outlines the characteristics of algorithms, including input, output, definiteness, finiteness, and uniqueness, and provides examples of algorithms for making tea and calculating the sum of two numbers. Additionally, it includes exercises to reinforce understanding of algorithm development and characteristics.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9
Chapter 2
Algorithms And Flowcharts Introduction to Algorithms and Flowcharts
Algorithms and flowcharts are step by
step procedure to solve a problem. They are written using simple English language and graphical notations. They can later be converted into any programming language of our choice. Algorithms A set of instructions designed to perform a specific task. It has finite number of steps, each of which performs a specific task. Following these sets of instructions it accomplishes the given task. An algorithm takes an input, processes it and produces an output. Characteristics of an algorithm Input: It can take zero or more quantities as input Output: At least one result should be produced. Definiteness: Each instruction should be clear and easy to understand. Finiteness: For any given input, the instruction should produce an output and should have finite number of steps. Uniqueness: Each instruction when executed should produce an unique result. Steps to develop an algorithm
Problem Description
Analyse the problem
Develop algorithm
Test the algorithm
Review the algorithm
Algorithm to prepare a cup of tea Step 1. Put the teabag in a cup. Step 2. Fill the kettle with water. Step 3. Boil the water in the kettle. Step 4. Pour some of the boiled water into the cup. Step 5. Add milk to the cup. Step 6. Add sugar to the cup. Step 7. Stir the tea. Step 8. Drink the tea. Algorithm to find the sum of two numbers Step 1. Accept two numbers A and B.
Step 2. SUM=A+B.
Step 3. Print SUM
Exercise 1. Which of the following is a notation similar to a programming language? a. Algorithm b Flowchart c Pseudo code d None of them 2. Select the step which is not used in developing an algorithm: a. Analysing the problem b. Creating a problem c. Reviewing the algorithm d. Solving the problem 3. List the characteristics of an algorithm. 4. Write an algorithm to prepare Maggi noodles. 5. Write an algorithm to find the sum and product of two numbers.