The Pomodoro Technique is a time management method that can be used for a wide range of tasks. Many students use this technique to organise their revision time before an exam.
This Pomodoro Technique was developed by Francesco Cirillo in the late 1980s. It uses a timer to break down work into short intervals, typically 25 minutes in length, separated by short breaks (3 to 5 minutes). Each interval is known as a pomodoro, from the Italian word for “tomato” because Francesco Cirillo used a tomato-shaped kitchen timer when he was a university student.
The technique is an iterative process based on the following steps:
- Decide on a task to complete,
- Work on this task for 25 minutes (using a timer),
- When the timer stops/rings, put a check mark on a post-it note,
- If you have fewer than 4 check marks:
- Take a short break (3 to 5 minutes),
- Repeat this process from step 2,
- After 4 check marks (pomodoros):
- Take a long break (15 to 30 minutes),
- Reset your check mark counter to zero,
- Repeat this process from step 2.
Pomodoro Timer – Algorithm/Flowchart
Your Task: (Python Code)
Use the above flowchart to implement a pomodoro timer using Python.
For testing purpose you can reduce the pomodoro intervals from 25 minutes to 10 seconds, the short breaks to 3 seconds and the long breaks to 5 seconds. Once your code will have been fully tested, you will reset it using more meaningful timings. (e.g. 25 minutes, 5 minutes, 30 minutes)
Extension Task #1:
To make your program more robust, you should make sure that the program only accepts a valid “Yes” or “No” answer to the question “Would you like to carry on?”.
To do so you will implement a validation routine to validate the user input. You can find more about Yes/No validation routines on this post.
Extension Task #2:
Add a few inputs at the start of the code for the user to change the settings of their pomodoro timer. The three settings that the user should be able to change are:
- How long (in minutes) should a pomodoro interval last for (e.g. 25 minutes)?
- How long (in minutes) should a short break last for (e.g. 5 minutes)?
- How long (in minutes) should a long break last for (e.g. 30 minutes)?
Your program should then use the settings provided by the end-user.
Solution...
The solution for this challenge is available to full members!Find out how to become a member:
➤ Members' Area