Download presentation

Presentation is loading. Please wait.

Published byJohn Stanley Modified over 4 years ago

1
Weeks – 01/ 2 Introduction to flowcharts components and psuedocode

2
1 11 Objectives Have familiarity using Ms.Visio Have a basic concept in designing solution using flowcharts. Have a basic concept in designing solution using pseudo-codes. Have a basic concept in solving problems and write them as pseudo-codes

3
2 2 Ms Visio Start all programs ms office ms Visio

4
3 3 Flowchart symbols Terminator START or END symbols to begin or terminate flowchart. Input/Output Data entry or display output program Process Transform data or expression Conditional / Decision Process with selection Preparation Initialize Arrow connection Connector Online connector

5
4 4 Flowchart Example-1

6
5 5 Flowchart Example-2

7
6 6 Exercise (flowchart) 1.Write a letter for your friend by post 2.Calculate employee fee which reads employee name, hours, and hourly rate. 3.Calculate grade a course with formula grade = 30% x Midterm + 20% x Task + 30% x Final+ 20%xQuiz. Input : name of course, Midterm, Quiz, Final, Task

8
7 7 Exercise (flowchart) 4. Calculating is total of sales by entering the name of goods, quantity, and price. Output : name of goods and total of purchasing. 5. Calculating area and circumference of circle. With input radius. Output : radius, around and area of circle.

10
9 No.1

11
10 No. 2

12
11 No.3

13
12 Pseudocode Pseudocode is informal form for depict of algorithm like a programming Ianguage. Objective of pseudocode : Easy to read Easy to understand Easy to get an idea

14
13 Pseudocode Example Send a letter to friend: 1. Write a letter on a paper. 2. Take an envelope. 3. Put a letter in an envelope. 4. Envelope cover use glue. 5. When you remember the address, so writing address at envelope. 6. Otherwise, find in adrress book, then writing address at envelope. 7. Giving stamp on a letter. 8. Bring a letter to the postoffice.

15
14 Exrcise (write a pseudocode) 1.Calculate employee fee which reads employee name, hours, and hourly rate. 2.Calculate grade a course with formula grade = 30% x Midterm + 20% x Task + 30% x Final+ 20%xQuiz. Input : name of course, Midterm, Task, Final, Quiz 3.Calculating total of sales by entering the name of goods, quantity, and price. Output : name of goods and total of purchasing.

16
15 Exercise(write a pseudocode) 4. Calculating area and circumference of circle. With input radius. Output : radius, circumference and area of circle. 5. Changing two number one another. Example initialy number1=4, number2=7, after executing its result number1=7, number2=4 6. Write a program to convert a temperature in degrees Fahrenheit to degrees Celcius and Reamur.

17
16 Answers-1 1.Calculate employee fee which reads employee name, hours, and hourly rate. Data Dictionary Name : string; Hour,rate, Fee : integer; Algorithm Input(Name, Hour) Rate 8000 Fee Hour*Rate

18
17 Answers-2 1.Calculate grade a course with formula grade = 30% x Midterm + 20% x Task + 30% x Final+ 20%xQuiz. Input : name of course, Midterm, Task, Final, Quiz Data Dictionary Course : string; MT, FT, Task, Q : integer; Grade :real Algorithm Input(Course ) Input(MT, FT, Task,Q) Grade 0.3*MT+0.2*Task+0.3*FT+0.2*Q Output(Course, Grade)

19
18 Answer-3 Calculating total of sales by entering the name of goods, quantity, and price. Output : name of goods and total of purchasing Data Dictionary sGood : string; Q, P, Total : integer; Algorithm Input(sGood, Q, P ) T Q*P Output(sGood, T)

20
19 Answer-4 4. Calculating area and circumference of circle. With input radius. Output : radius, circumference and area of circle. Data Dictionary radius : integer; Area, C :real Algorithm Input(radius ) Area 3.14*radius*radius C 2*3.14*radius Output(Area =, Area) Output(Circumference =,C)

21
20 Answer-5 Changing two number one another. Example initialy number1=4, number2=7, after executing its result number1=7, number2=4 Data Dictionary number1, number2, temp : integer Algorithm Input(number1, number2) temp number1 number1 number2 number2 temp Output(number1, number2)

Similar presentations

OK

1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.

1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.

© 2018 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google