sem1 plt xp_01

20
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

Upload: niit-care

Post on 24-May-2015

1.317 views

Category:

Technology


5 download

DESCRIPTION

Old Slides

TRANSCRIPT

Page 1: Sem1 plt xp_01

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  

Page 2: Sem1 plt xp_01

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

Page 3: Sem1 plt xp_01

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

Page 4: Sem1 plt xp_01

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

Page 5: Sem1 plt xp_01

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

Page 6: Sem1 plt xp_01

Introducing Flowcharts

©NIIT PLT/Lesson 1/Slide 6 of 20

Problem-Solving Techniques

Symbols Used in Flowcharts

Symbol Activity

Input

Processing

Output

Page 7: Sem1 plt xp_01

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

Page 8: Sem1 plt xp_01

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

Page 9: Sem1 plt xp_01

Introducing Flowcharts

©NIIT PLT/Lesson 1/Slide 9 of 20

Problem-Solving Techniques

Symbols Used in Flowcharts (Contd.)

Symbol Activity

Annotation

Page 10: Sem1 plt xp_01

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.

Page 11: Sem1 plt xp_01

Introducing Flowcharts

©NIIT PLT/Lesson 1/Slide 11 of 20

Just a Minute…(Contd.)

S. No. Symbol Activity

3.

4.

5.

Page 12: Sem1 plt xp_01

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

Page 13: Sem1 plt xp_01

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

Page 14: Sem1 plt xp_01

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.

Page 15: Sem1 plt xp_01

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

Page 16: Sem1 plt xp_01

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.

Page 17: Sem1 plt xp_01

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

Page 18: Sem1 plt xp_01

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.

Page 19: Sem1 plt xp_01

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.

Page 20: Sem1 plt xp_01

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.