0% found this document useful (0 votes)
27 views7 pages

W2 C3 Student Worksheet

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views7 pages

W2 C3 Student Worksheet

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Week 2 Class 3

Student Worksheet
Language skills (30 hour)

Jobs: Do you work 9 to 5?


1. As you read, complete the text with questions 1-5 from the list below (A-E)

A. Do you have time together?


B. Does he have a free weekend?
C. What do you do Jess?
D. What does your husband do?
E. Do you work long hours?
2. Circle the correct answer. If the sentence is false, say why.

1. Jess has a 9 to 5 job. T/F


2. Carl is a detective. T/F
3. Carl and Jess Spend a lot of time together. T/F
4. Carl doesn’t get paid for overtime work. T/F

3. Read the two comments below. Which of the problems is more serious? Write
reasons using Present Simple Negatives.

Example: The boss doesn’t understand the workers.

Problem 1. In my company, junior 2 employees often work more than 60 hours a week.
If the boss is in the office, we feel we have to stay until he leaves. Very often, we are not
paid for working overtime, we work for free. And for many of us, the summer holiday is
only a one-week vacation. We work a lot of overtime, but we aren't more productive.
We just have more health problems.

Problem 2. Things are better now than in the past, but many of my female colleagues
aren't happy. They often get less money than men for the same work, and it's more
difficult for us women to get a promotion. In addition, working in teams is very difficult.
We women can express our opinions, of course, but it's almost always the manager who
makes the decisions.

The more serious problem is:

The reasons are:


1.

2.

3.
Reading skills (60 hour)

I. Before you read


1. The Word Cloud below shows the most frequent verbs in the text. Do you know
what they mean? If not, look them up in a dictionary.
https://www.wordreference.com/

2. Parts of Speech, write the parts of the speech for each word (nouns, verbs,
adjective, etc.)

Blue words in the cloud are: ________________


Red words in the cloud are: ________________
Pink words in the cloud are: ________________

3. As you read the text, find these key words and highlight them.

II. While you read


1. 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.
True False
1. Users and programmers can define their own function.
2. Users can call functions however they want.
3. Modularized codes are easier than long codes in a sequence.
4. DRY is a principle that makes coding less repetitive.
5. In modularized codes, each module focuses on one task.
2. Choose the correct answers to the following questions.

● What is one of the primary benefits of defining functions in programming, in


accordance with the Don't Repeat Yourself (DRY) principle?
A. Enhancing code aesthetics
B. Reducing software development time
C. Minimizing the need for comments
D. Eliminating the need for whitespace

● How do functions contribute to achieving modularity in programming?


A. By increasing code complexity
B. By combining all code into a single function
C. By enabling the division of complex processes into smaller, focused modules
D. By eliminating the need for function calls

● Which keyword in Python is used to introduce a new function definition?


A. call
B. define
C. func
D. def

The Importance of Python Functions

Virtually all programming languages today support a form of user-defined functions. Some
languages call them functions and others call them:

● Subroutines
● Procedures
● Methods
● Subprograms

Why is it important that users define functions? There is a Don’t Repeat yourself Principle
in programming. Don't repeat yourself (DRY) is a principle of software development reduces
repetition of software patterns. It saves time. It helps you avoid copy pasting, Instead, you
can call the function that you define.
Another reason is:
Modularity

Functions allow complex processes to be broken up into smaller steps. Imagine, for
example, that you have a program that reads in a file, processes the file contents, and then
writes an output file. Your code for that program could look like this:

# Main program

# Code to read file in


<statement>
<statement>
<statement>
<statement>

# Code to process file


<statement>
<statement>
<statement>
<statement>

# Code to write file out


<statement>
<statement>
<statement>
<statement>

In this example, the main program is a bunch of code in a long sequence, with whitespace
and comments to help organize it. This code is not long, and you understand it. If it gets
longer, it becomes complex to understand.

Modularized Code: You could also structure the code more like this:

def read_file():
# Code to read file in
<statement>
<statement>
<statement>
<statement>

def process_file():
# Code to process file
<statement>
<statement>
<statement>
<statement>

def write_file():
# Code to write file out
<statement>
<statement>
<statement>
<statement>

# Main program
read_file()
process_file()
write_file()
This example is modularized. The code is divided into modules and each module focuses on
a specific task. Those tasks are read, process, and write. The main program now simply
needs to call each of these in turn.

Note: The def keyword introduces a new Python function definition. You’ll learn all about
this very soon.

You might also like