LAB
Estimated time
15-30 minutes
Level of difficulty
Medium
Objectives
- Improving the student's skills in creating decorators and operating with them.
Scenario
- Create a function decorator that prints a timestamp (in a form like year-month-day hour:minute:seconds, eg. 2019-11-05 08:33:22)
- Create a few ordinary functions that do some simple tasks, like adding or multiplying two numbers.
- Apply your decorator to those functions to ensure that the time of the function executions can be monitored.