WELCOME TO ENGLISH CLASS
WELCOME TO ENGLISH CLASS
ALGORITHMS
DATE
DATE
Objective:
Students will demonstrate their understanding of the topic
Algorithms with a graphic organizer.
AGENDA
WARM UP:
Find Max
CLASS ACTIVITY:
Let´s practice the class vocabulary
Complete the sentences with the correct option
Reading stragety (video) : Previewing and predicting
Read the Text “What makes a good algorithm?”
Wrap- Up
Complete this multiple-choice exercise to check their
understanding of the text.
WARM-UP
“Find Max”
Choose the largest number from the list.
Example:
Set 1
five thousand 5.000
seven hundred and twenty-seven 727
three million 3.000.000
eighty-eight point seven 88.7
twelve thousand four hundred and
seventeen 12427
The correct answer in Set 1 is “three million”.
3.000.000
VOCABULARY
- Steps Pasos
- Perform Llevar a cabo
- Recipe Receta
- Unambiguous inequívoco
- Set of inputs Conjunto de entradas
- Set of outputs Conjunto de salidas
- Useful Útil
- Return - Devolver
Select the correct option to complete the sentences
with the new words.
• Today, a cellphone can perform many functions of a
computer.
• English is a very useful language because there is a lot of
information in English.
• A set of inputs is the result of an algorithm.
• I don´t know how to cook ajiaco, so I need to look for a
recipe.
• This program returns an error message. I need to find the
error and correct it.
Video Reading Strategy
https://www.youtube.com/watch?v=5g3dY0SfmtI
Algorithm VS Recipe
• An algorithm specifies a series of steps that perform a
particular computation. Algorithms are similar to recipes.
Recipes tell you how to cook food by completing a
number of steps. For example, to make a cake the steps
are:
• 1. preheat the oven;
• 2. mix flour, sugar, and eggs;
• 3. pour into a baking pan;
• 4. etc.
• But “algorithm” is a technical term and it is more specific
than “recipe”.
Characteristics of an algorithm
• If you call something “an algorithm”, it means that these characteristics are all true:
• 1. An algorithm is an unambiguous description that makes clear what to implement. In a computational
algorithm, a step such as “Select a large number” is not clear: what is “large”? 1 million, 1 billion, or 100?
• 2. An algorithm expects a defined set of inputs.
• 3. An algorithm produces a defined set of outputs.
• 4. An algorithm is guaranteed to terminate and produce a result. If an algorithm could potentially be
eternal and run forever, it wouldn’t be very useful because you might never get a result.
• 5. The majority of algorithms are guaranteed to produce the correct result.
An Example Algorithm find_max()
Problem: From a list of positive numbers, return the largest number on the list.
Inputs: A list L of positive numbers. This list must contain at least one number.
Outputs: A number n, which will be the largest number of the list.
Algorithm:
❑ Set max to 0.
❑ For each number x in the list L, compare it to max. If x is larger, set max to x.
❑ max is now set to the largest number in the list.
An implementation in Python:
Does this meet the criteria for being an algorithm?
• 1. Is it unambiguous? Yes. Each step of the algorithm consists of
primitive operations, and translating each step into Python code is very easy.
• 2. Does it have defined inputs and outputs? Yes.
• 3. Is it guaranteed to terminate? Yes. The list L is not infinite, so after
looking at every element of the list the algorithm will stop.
• 4. Does it produce the correct result? Yes.
Adapted from: https://fiftyexamples.readthedocs.io/en/latest/algorithms.html
WRAP-UP
Complete this multiple-choice exercise:
1. The objective of an algorithm is to:
a. Perform a computation
b. Perform a recipe
2. … is more specific.
a. Recipe
b. Algorithm
3. The instruction “Select a large number” is:
a. Ambiguous
b. Unambiguous
4. An eternal algorithm is:
a. Useful
b. Useless
5. The objective of “find_max” is:
a. To find many numbers
b. To find the largest number
SELF-EVALUATION
1. Entiendo cómo utilizar la estrategia de previsualizar y
predecir con un texto.
Yes No Maybe
2. La estrategia de previsualizar y predecir me ayuda a tener
una idea general de qué se va a tratar el texto.
Yes No Maybe
3. La estrategia de previsualizar y predecir me ayuda a
concentrarme más mientras leo.
Yes No Maybe
4. Cuando previsualicé y predije el texto de esta clase, pude
adivinar unos detalles correctamente.
Yes No Maybe