Here’s a simple Python script for task prioritization based on urgency and importance. It uses a simple matrix to prioritize tasks, where each task is rated on a scale from 1 (low) to 5 (high) for both urgency and importance. The script will output tasks sorted by priority.
Explanation:
-
Each task has a name, urgency, and importance rating (on a 1-5 scale).
-
The
priority_scoreis calculated by adding urgency and importance. -
Tasks are then sorted by the priority score in descending order, where a higher score means higher priority.
-
The
display_tasksfunction prints the list of tasks along with their urgency, importance, and priority score.
Sample Output:
This script can easily be extended, e.g., by adding deadlines, or even creating a user interface to interact with the tasks dynamically.