WorksheetsPython L45 Pomodoro 3
Total questions: 10
Worksheet time: 7mins
What does the variable reps count?
How many breaks you had
How many times the timer has started
The number of seconds in a break
The number of ticks on the clock
reps goes up by 1 every time start_timer() runs.
True
False
After 8 cycles, the program gives you a ________.
Short break
Work Mode
Which line makes the program go into short break mode?
if reps % 8 == 0
elif reps % 2 == 0
elif reps % 2 == 1
if reps == 10
Match each condition with what happens:
Long Break
reps % 8 == 0
Short Break
reps % 2 == 0
Work Mode
reps % 2 == 1
When reps is an odd number, the program always runs Work Mode.
True
False
Why does the program check with % (modulus) instead of just ==?
Because % makes numbers bigger.
Because % lets us check patterns (like every 2nd or 8th time).
If you wanted a long break every 6 cycles instead of 8, which of the following code can be use?
if reps % 8 == 0
if reps % 6 == 0
if reps == 6
if reps == 8
What does global timer mean in the script?
It allows the timer variable to be used in different functions
It makes the timer run faster.
It creates a new timer every time.
It changes the timer into a constant number.
Fill in the blank
