wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python L45 Pomodoro 3

Total questions: 10

Worksheet time: 7mins

Name
Class
Date
1.

What does the variable reps count?

a)

How many breaks you had

b)

How many times the timer has started

c)

The number of seconds in a break

d)

The number of ticks on the clock

2.

reps goes up by 1 every time start_timer() runs.

a)

True

b)

False

3.

After 8 cycles, the program gives you a ________.

a)
Long break
b)

Short break

c)

Work Mode

4.

Which line makes the program go into short break mode?

a)

if reps % 8 == 0

b)

elif reps % 2 == 0

c)

elif reps % 2 == 1

d)

if reps == 10

5.

Match each condition with what happens:

a)

Long Break

1.

reps % 8 == 0

b)

Short Break

2.

reps % 2 == 0

c)

Work Mode

3.

reps % 2 == 1

6.

When reps is an odd number, the program always runs Work Mode.

a)

True

b)

False

7.

Why does the program check with % (modulus) instead of just ==?

a)

Because % makes numbers bigger.

b)

Because % lets us check patterns (like every 2nd or 8th time).

8.

If you wanted a long break every 6 cycles instead of 8, which of the following code can be use?

a)

if reps % 8 == 0

b)

if reps % 6 == 0

c)

if reps == 6

d)

if reps == 8

9.

What does global timer mean in the script?

a)

It allows the timer variable to be used in different functions

b)

It makes the timer run faster.

c)

It creates a new timer every time.

d)

It changes the timer into a constant number.

10.

Fill in the blank