PROG 211-Lesson 3-Algorithm
PROG 211-Lesson 3-Algorithm
Standard Algorithm:
Algorithms
HELLO!
Engr. Erwin Mariquina
You can find me at
2
Pre-test
Multiple choice: Choose the letter of the correct answer that referred to the
statements below on the steps in writing an algorithm.
3
Pre-test
Multiple choice: Choose the letter of the correct answer that referred to the
statements below on the steps in writing an algorithm.
2. Finding your starting and ending point are crucial to listing the steps of the
process. To determine a starting point, determine the answer to these
questions, except?
A. What data/inputs are available?
B. Where is that data collected?
C. What facts will we learn from the process?
D. What formulas are applicable to the issue at hand?
4
Pre-test
Multiple choice: Choose the letter of the correct answer that referred to the
statements below on the steps in writing an algorithm.
3. As with the starting point, you can find the end point of your algorithm by
focusing on these questions, except?
A. What facts will we learn from the process?
B. What changes from the start to the end?
C. What will be added or no longer exist?
D. How do data values relate to each other?
5
Pre-test
Multiple choice: Choose the letter of the correct answer that referred to the
statements below on the steps in writing an algorithm.
4. To use a real-world example, let’s say your goal is to have lasagna for
dinner. You’ve determined that the starting point is to find a recipe, and
that the end results is that you’ll have lasagna fully cooked and ready to eat
by 7pm. What will you do?
A. Determine how will you accomplish each step.
B. List the steps from start to finish.
C. Find the ending point of the algorithm.
D. Determine the outcome of your code.
6
Pre-test
Multiple choice: Choose the letter of the correct answer that referred to the
statements below on the steps in writing an algorithm.
5. Now that you’ve written your algorithm, its time evaluate the process by?
A. Review the algorithm.
B. List the steps from start to finish.
C. Find the ending point of the algorithm.
D. Determine how will you accomplish each step.
7
Expectations
At the end of the lesson, the students should be able to:
1. Understand algorithm; and
2. Code using standard algorithm.
8
Technical Terms:
Algorithm – the step by step procedure in solving a problem
End point – the final stage of a period or process.
Outcome – the way a thing turns out; a consequence.
Starting point – a place or position where something begins;
a place or position where something begins.
9
Technical Terms:
Algorithm – the step by step procedure in solving a problem
End point – the final stage of a period or process.
Outcome – the way a thing turns out; a consequence.
Starting point – a place or position where something begins;
a place or position where something begins.
10
What is an algorithm?
Generally, an algorithm is a step-by-step procedure to solve
Problems. A guide for installing new software, a manual for
assembling appliance, and even recipes are examples are
examples of algorithm. In programming, making an algorithm
is exciting, they are expressed in a programming language or in
a pseudo code.
11
continuation…….
Algorithm makes the whole procedure more efficient as well
as consistent. It is also helps in identifying decision points,
processes, and essential variables to solve the problem. A
programmer can also see and determine easily the error in a
particular process using an algorithm.
12
Steps in Writing an Algorithm in
Programming
1. Determine the outcome of your code.
2. Decide a starting point.
3. Finding the ending point of the algorithm.
4. List the steps from start to finish.
5. Determine how you will accomplish each step.
6. Review your algorithm.
13
Algorithm Examples
Example 1: Write an algorithm to convert the length in feet to
centimeter.
14
Algorithm Examples
Example 2: Write an algorithm that will read the two sides of a
rectangle and calculate its area.
Step 1: Input W, L
Step 2: A = L x W
Step 3: print A
15
THANKS!
Any questions?
You can find me at:
@username
[email protected]
16