Challenge: Namedtuples, Stacks and Queues
Explore how to implement namedtuples alongside stacks and queues to manage and process tasks efficiently. Understand how to organize tasks by time and priority, and practice scheduling strategies that handle quick and urgent tasks first.
Problem 1
Task: Create a namedtuple called Task with fields id and name.
- Make a stack of 3 tasks.
- Pop one task from the stack.
- Print the popped task.
Problem 2
You are given a set of tasks. Each task has three fields:
id(an integer ID)name(a string description)time(time in minutes)
You should: