You are on page 1of 8

PAGE 20 [Q1 & Q2] 1. A pseudo code that converts the distance in mile to kilometre is given as in Algorithm 2.3.

Usinf the Microsoft Word software, develop this pseudo code according to the steps explained in the first concept. Algorithm 2.3: Convert the distance in mile to kilometer 1. 2. 3. 4. Start Set KM_PER_MILE to 1.609 Set Distance_Mile to 100 Convert the distance in mile to kilometres using the formula: Distance_Kilo = KM_PER_MILE x Distance_Mile 5. Display the distance in kilometer 6. End

2. Algorithm 2.4 is pseudo code that reads the radius of a circle, and computes the area of that circle. Using the Microsoft Word software, develop this pseudo code. Algorithm 2.4 : Compute the area of circle the area of a circle 1. 2. 3. 4. Start Set PI = 3.14159 Read the Radius Calculate the area of acircle using the formula: Area = Radius x Radius x PI 5. Display Area 6. End

PAGE 27 & 28 [EXERCISE 3 : Q1,Q2,Q3 & Q4] Given the following set of problems. Analyze each problem and identify the input, fomula and the output. Write the psedo code and draw the for each.

1. Read three numbers. Calculate the sum of those three numbers and find the average. Display all three numbers, as well as the total of those numbers an the in average. Output: average the numbers of three numbers Input: the three numbers are given, num1, num2, num3 Formula: Average = Sum total of number divide total number of number Pseudocode design of the problem: Start Read three numbers, num1, num2, num3 Calculate the average using formula Average = Sum total of number divide total number of numbers Print the Average of numbers End Flowchart design of the problem:
Start

Read three numbers,

num1, num2, num3

Calculate the average using formula Average= sum total of number divide total number of numbers

Print the Average of numbers

End

2. Calculate the average weight of four students. Attempt to analyze this problem by sating its input, output and the formula required to determine the average weight. Display each students weight calculated. Output: Average weight of four student Input: a)weight of student b) number of student Formula: Pseudocode design of the problem: Start Read weight of student, student1, student2, student3, student4 calculate the average using formula :

Show the Average weight of student End Flowchart design of the problem:

Start Read weight of student,student1, student2, student3, student4

Calculate the average using fomula: Average weight =Total weight of student number of student

Show the Average weight of student

End

3. Convert the time entered by the user in the form of day, hours and minute to minutes. The conversion unit is as follows : 1 day is equivalent to 24 hours 1 hours is equivalent to 60 minutes Output: Time(minute) Input: Time ( ) Formula: ( ) Pseudocode design of the problem: Start Key in time in Day, Hours, Minute Caculate time in minute using fomula: Display time(minute) End Flowchart design of the problem: ( ) (

Start

Key in time in Day, Hours, Minute

Caculate time in minute using fomula: minute= time(day) x 24 x 60 + time(hour) x 24 + time(minute)

Display time(minute)

End

4. Convert the temperature entered by the user in the unit of Fahrenheit to the unit of Celcius. The conversion formula is as follows : Fahrenheit =[ Output: The value in Celcius Input: The value in Fahrenheit Formula: Celcius = Pseudocode design of the problem: Start Key in the value in Fahrenheit Calculate the value in Celcius use Formula:
Celcius =

Display the Value in Celcius End Flowchart design of the problem:

Start

Key in the value of Fahrenheit

Calculate the value of Celcius use Formula:


Celcius= 5[Fahrenheit-32] /9

Display the Value Celcius

End

PAGE 26 [EXERCISE 2 : Q2]

1. Trace the content of the variables and determine the output of Algorithm 2.4 if the input for Radius is : [PI= 3.14159] Calculation a. 3 Area =radius x radius x PI Area = 3 x 3 x 3.14159 Area = 28.27 unit b. 10 Area =radius x radius x PI Area = 10 x 10 x 3.14159 Area = 314.17 unit c. 150 Area = radius x radius x PI Area = 10 x 10 x 3.14159 Area = 70685.78 unit

OBJECTIVE
Develop pseudo code using the Microsoft Word Software and Microsoft Visio. Develop flow chart using the Microsoft Word software. Trace pseudo code and flowchart in order to determine the contents of variables and the output. Design a pseudo code or flowchart from given problem. Identify the problem are given and solve the problem.

CONCLUSION
At the end me know how to develop pseudo code using the Microsoft Word Software and Microsoft Visio and also Develop flow chart using the Microsoft Word software. Beside that trace psedo code and flowchart in order to determine the content of variables and the output. In addition understand what is pseudo code or flowchart, then design a pseudo code and flowchart from given problem. At the last me know identify the problem are given and solve the problem.

You might also like