Professional Documents
Culture Documents
Student Worksheet
AÑO 2021
Scanning
Remember
Scanning is a reading strategy to find specific information quickly. When you scan a
text, you have a question in your mind and you read a passage only to find the
answer, ignoring information that does not relate to your question.
Exercise 1
You have three minutes to do the following. Use the text Python "while" Loops (Indefinite
Iteration).
El bucle while
Las declaraciones de Python rompen y continúan
La cláusula else
Bucles infinitos
Bucles while anidados
Bucles while de una línea
Conclusión
Iteration means executing the same block of code over and over, potentially many
times. A programming structure that implements iteration is called a loop.
La iteración significa ejecutar el mismo bloque de código una y otra vez,
potencialmente muchas veces. Una estructura de programación que implementa la
iteración se llama bucle.
In programming, there are two types of iteration, indefinite and definite:
With indefinite iteration, the number of times the loop is executed is not
specified explicitly in advance. Rather, the designated block is executed
repeatedly as long as some condition is met.
With definite iteration, the number of times the designated block will be
executed is specified explicitly at the time the loop starts.
In this tutorial, you’ll:
Learn about the while loop, the Python control structure used for
indefinite iteration
See how to break out of a loop or loop iteration prematurely
Explore infinite loops
When you’re finished, you should have a good grasp of how to use indefinite iteration
in Python.
Cuando haya terminado, debe tener una buena idea de cómo usar la iteración
indefinida en Python.
Part 1
loop indefinite
definite iteration
executed while
Exercise 2
Scan the following extract from the same text to find the answers to the questions. Remember, do
not focus on every word.
Infinite Loops
Suppose you write a while loop that theoretically never ends. Sounds weird, right?
Consider this example:
Python >>>
This code was terminated by Ctrl + C which generates an interrupt from the keyboard.
Otherwise, it would have gone on unendingly. Many foo output lines have been removed
and replaced by the vertical ellipsis in the output shown. Clearly, True will never be false,
or we’re all in very big trouble. Thus, while True: initiates an infinite loop that will
theoretically run forever.
Maybe that doesn’t sound like something you’d want to do, but this pattern is actually
quite common. For example, you might write code for a service that starts up and runs
forever accepting service requests. “Forever” in this context means until you shut it down,
or until the heat death of the universe, whichever comes first. More prosaically,
remember that loops can be broken out of with the break statement. It may be more
straightforward to terminate a loop based on conditions recognized within the loop body,
rather than on a condition evaluated at the top.
Here’s another variant of the loop shown above that successively removes items from
a list using .pop() until it is empty:
Python >>>
>>> a = ['foo', 'bar', 'baz']
>>> while True:
... if not a:
... break
... print(a.pop(-1))
...
Bibliophile Flat Illustration made by Storyset:
https://storyset.com/illustration/bibliophile/rafiki
Part 1
Complete the title below with the information from the text presents in exercise 1 and 2:
Article Title:
Author:
Date of publication:
Website:
Topic:
Part 2
1. There is an action that causes an interrupt from the keyboard. What are the two keys that
terminated the code?
_____________________________________________________________________________
2. What pattern do they refer to in the section “…but this pattern is actually quite common”?
_____________________________________________________________________________
Decide whether the following statements about the text Python "while" Loops (Indefinite
Iteration) are True or False. Tick the correct box.
Part 4
Vocabulary
Read the following words and decide whether they are nouns, adjectives, verbs, or adverbs:
infinite theoretically
condition an interrupt
break out true
remove termination
multiple unendingly
noun adjective verb adverb
Part 5
Word families
The words in the following table are taken from the reading Python "while" Loops (Indefinite
Iteration). Fill in the chart below with the correct word forms:
educationally
research X
decision
Part 6
Word Stress
Put the following words from the text under the correct stress patterns. You can research the
meaning of the words using an online dictionary. Check the links below if you need:
✔ MacMillan Dictionary
✔ Collins Dictionary
infinite iteration
Termination multiple
condition termination
remove elipsis
developed activity
fundamental alternative