sem1 plt xp_01
DESCRIPTION
Old SlidesTRANSCRIPT
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 1 of 20
Objectives
In this lesson, you will learn to:
Identify input and output requirements
Understand programs
Represent logic by using flowcharts
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 2 of 20
Input, Process, and Output
Phases
Activities can be broken into separate phases
The first phase is called the input phase
The second phase is called the process phase
The last phase is known as the output phase
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 3 of 20
Input, Process, and Output (Contd.)
I-P-O Cycle
The cycle of activities performed by a computer is referred to as the Input-Process-Output cycle or the I-P-O cycle
A computer consists of several components
Each component participates in either one of the input, process, or output phases
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 4 of 20
Programs
Programs
A computer is designed to accept input, process it, and generate output
A set of instructions to perform a task is called a program
A number of programs together form an application
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 5 of 20
Problem-Solving Techniques
Flowcharts
A flowchart is a graphical representation of the steps to be followed for solving a problem
It consists of a set of symbols
Each symbol represents a specific activity
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 6 of 20
Problem-Solving Techniques
Symbols Used in Flowcharts
Symbol Activity
Input
Processing
Output
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 7 of 20
Problem-Solving Techniques
Symbols Used in Flowcharts (Contd.)
Symbol Activity
Decision
Procedure or Subroutine
Flow lines
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 8 of 20
Problem-Solving Techniques
Symbols Used in Flowcharts (Contd.)
Symbol Activity
Terminator
On page connector
Off page connector
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 9 of 20
Problem-Solving Techniques
Symbols Used in Flowcharts (Contd.)
Symbol Activity
Annotation
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 10 of 20
Just a Minute…
Match the following verbs with appropriate symbols:
Get, Write, Stop, Add, Start, Multiply, Read, Subtract, Divide, Display, Input, Output, If
S. No. Symbol Activity
1.
2.
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 11 of 20
Just a Minute…(Contd.)
S. No. Symbol Activity
3.
4.
5.
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 12 of 20
Drawing Simple Flowcharts
Flowchart for Preparing Tea
Start
Stop
The Steps for Preparing tea
Input Water, Sugar, Tea Leaves and Milk
Boil the Ingredients
Tea is Prepared
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 13 of 20
Drawing Simple Flowcharts (Contd.)
Flowchart for Manipulating Numbers
Start
Stop
Get a Number
Add 1 to the Number
Display the Number
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 14 of 20
Drawing Simple Flowcharts (Contd.)
Example
The value of sale made is calculated as the number of units sold multiplied by the price per unit. Draw a flowchart to calculate and print the sale value.
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 15 of 20
Drawing Simple Flowcharts (Contd.)
Start
Stop
Input Unit Price
Multiply Units Sold By Unit Price
Print Total Sale Value
Input Units Sold
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 16 of 20
Drawing Simple Flowcharts (Contd.)
Problem Statement 1.P.1
Draw a flowchart to represent the procedure of admission of a student to NIIT.
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 17 of 20
Drawing Simple Flowcharts (Contd.)
Problem Statement 1.P.2
Rearrange the steps given below in the order of correct sequence to add the two numbers and draw a flowchart for the same.
1. Get the First Number
2. Display the Result
3. Stop
4. Add the Two Numbers
5. Get the Second Number
6. Start
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 18 of 20
Drawing Simple Flowcharts (Contd.)
Problem Statement 1.P.3
Draw a flowchart to accept five numbers and display the sum of the numbers.
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 19 of 20
Drawing Simple Flowcharts (Contd.)
Problem Statement 1.P.4
Draw a flowchart to input any number, multiply it by 2, and display the result.
Introducing Flowcharts
©NIIT PLT/Lesson 1/Slide 20 of 20
Summary
In this lesson, you learned that:
The cycle of activities performed by a computer follows the Input-Process-Output cycle.
A set of instructions to perform a particular job is called a program.
A flowchart is a graphical representation of the steps to be followed for solving a problem.
A flowchart consists of a set of symbols, where each symbol represents a specific activity.