Professional Documents
Culture Documents
Week 5 Class 2: Student Worksheet
Week 5 Class 2: Student Worksheet
Week 5 Class 2: Student Worksheet
Student Worksheet
Part 1: Language skills (1 hour)
Busy made by StorySet: <a href="https://storyset.com/people">Illustration by Freepik Storyset</a>
Does Colombia have seasons? Write the months of the year under the correct seasons.
Which of the seasons are busy in Colombia? Which season are leisure time?
2. Review: At, IN, ON
Morning
9:00 am Lesson starts. He has (3) ____ or (4) ______ lessons before lunch.
Afternoon
Evening
8. What do Marjan and her son have in common? Who is more tired in the evening?
9. Position of Adverbs. Look at the highlighted adverbs. Analyze and answer the
questions
Task. With your partner, prepare 6 questions to
interview another group. Follow the checklist below.
Your questions
Q1
Q2
Q3
Q4
Q5
Q6
A. Keywords
The Word Cloud below show the most frequent verbs in the text. Do
you know what they mean? As you read the text, mark them. If you do not know
them, look them up in a regular dictionary o Python glossary.
https://www.wordreference.com/
https://docs.python.org/3/glossary.html
B. Predicting
After checking the vocabulary, write a sentence predicting the topic that
you are going to read in this text.
II While you read
Before you read, decide whether the statements below are ‘T’ (true) or ‘F’
(false). Then read the text below to confirm or correct your answers.
In this tutorial, you'll learn about Python file operations. More specifically, opening
a file, reading from it, writing into it, closing it, and various file methods that you should be
aware of.
Files
Files are named locations on disk to store related information. They are
used to permanently store data in a non-volatile memory (e.g. hard disk).
Random Access Memory (RAM) is volatile (it loses its data when the
computer is turned off). So, we use files for future use of the data by permanently
storing them.
When we want to read from or write to a file, we need to open it first. When
we are done, it needs to be closed so that the resources that are tied with the file
are freed.
Hence, in Python, a file operation takes place in the following order:
1. Open a file
Python has a built-in open() function to open a file. This function returns a file
object, also called a handle, as it is used to read or modify the file accordingly.
We can specify the mode while opening a file. In mode, we specify whether we
want to read r, write w or append a to the file. We can also specify if we want to
open the file in text mode or binary mode.
The default is reading in text mode. In this mode, we get strings when reading from
the file.
On the other hand, binary mode returns bytes and this is the mode to be
used when dealing with non-text files like images or executable files.
Mode Description
Opens a file for writing. Creates a new file if it does not exist or
w
truncates the file if it exists.
Opens a file for exclusive creation. If the file already exists, the
x
operation fails.
Opens a file for appending at the end of the file without truncating it.
a
Creates a new file if it does not exist.
t Opens in text mode. (default)
Unlike other languages, the character a does not imply the number 97 until
it is encoded using ASCII (or other equivalent encodings).
Moreover, the default encoding is platform dependent. In windows, it
is cp1252 but utf-8 in Linux.
As a result, we must not also rely on the default encoding or our code will behave
differently in different platforms.
So, when working with files in text mode, it is highly recommended to specify the
encoding type.