[Python] Simple Task Manager
Submit solution
Python
Points:
10
Time limit:
0.5s
Memory limit:
12M
Author:
Problem type
Allowed languages
Simple Task Manager
You are tasked with creating a simple program to manage a list of tasks. Each task has a name and a priority level. Your program should allow users to perform the following operations through a menu-driven program.
Order of Functions
- Add a task
- Add a task at a particular location
- Remove a task
- Remove a task with index
- Remove a task at the end
- Sort
- Reverse
- Count
- Clear
Test Data
Input 1
1
Adarsh
1
Adhithya
1
Anu
1
Arul
2
2
Agil
2
3
Aishu
10
Output 1
Added
['Adarsh']
Added
['Adarsh', 'Adhithya']
Added
['Adarsh', 'Adhithya', 'Anu']
Added
['Adarsh', 'Adhithya', 'Anu', 'Arul']
Added
['Adarsh', 'Adhithya', 'Agil', 'Anu', 'Arul']
Added
['Adarsh', 'Adhithya', 'Agil', 'Aishu', 'Anu', 'Arul']
Exiting Loop
Task Sheet Deleted
Input 2
1
Adarsh
1
Adhithya
1
Anu
1
Arul
2
2
Agil
2
3
Aishu
3
Arul
10
Output 2
Added
['Adarsh']
Added
['Adarsh', 'Adhithya']
Added
['Adarsh', 'Adhithya', 'Anu']
Added
['Adarsh', 'Adhithya', 'Anu', 'Arul']
Added
['Adarsh', 'Adhithya', 'Agil', 'Anu', 'Arul']
Added
['Adarsh', 'Adhithya', 'Agil', 'Aishu', 'Anu', 'Arul']
Removed
['Adarsh', 'Adhithya', 'Agil', 'Aishu', 'Anu']
Exiting Loop
Task Sheet Deleted
Input 3
1
Adarsh
1
Adhithya
1
Anu
1
Arul
2
2
Agil
2
3
Aishu
3
Adarsh
4
2
5
10
Output 3
Added
['Adarsh']
Added
['Adarsh', 'Adhithya']
Added
['Adarsh', 'Adhithya', 'Anu']
Added
['Adarsh', 'Adhithya', 'Anu', 'Arul']
Added
['Adarsh', 'Adhithya', 'Agil', 'Anu', 'Arul']
Added
['Adarsh', 'Adhithya', 'Agil', 'Aishu', 'Anu', 'Arul']
Removed
['Adhithya', 'Agil', 'Aishu', 'Anu', 'Arul']
Poped
['Adhithya', 'Agil', 'Anu', 'Arul']
Poped
['Adhithya', 'Agil', 'Anu']
Exiting Loop
Task Sheet Deleted
Input 4
1
Ambili
1
Ramaguru
1
Saurabh
1
Praveen
1
Anand
1
Sethumadhavan
6
7
10
Output 4
Added
['Ambili ']
Added
['Ambili ', 'Ramaguru']
Added
['Ambili ', 'Ramaguru', 'Saurabh']
Added
['Ambili ', 'Ramaguru', 'Saurabh', 'Praveen']
Added
['Ambili ', 'Ramaguru', 'Saurabh', 'Praveen', 'Anand']
Added
['Ambili ', 'Ramaguru', 'Saurabh', 'Praveen', 'Anand', 'Sethumadhavan']
Sorted
['Ambili ', 'Anand', 'Praveen', 'Ramaguru', 'Saurabh', 'Sethumadhavan']
Reversed
['Sethumadhavan', 'Saurabh', 'Ramaguru', 'Praveen', 'Anand', 'Ambili ']
Exiting Loop
Task Sheet Deleted
Input 5
1
Ambili
1
Ramaguru
1
Praveen
1
Anand
1
Sethumadhavan
1
Ramaguru
6
8
Ramaguru
9
10
Output 5
Added
['Ambili ']
Added
['Ambili ', 'Ramaguru']
Added
['Ambili ', 'Ramaguru', 'Praveen']
Added
['Ambili ', 'Ramaguru', 'Praveen', 'Anand']
Added
['Ambili ', 'Ramaguru', 'Praveen', 'Anand', 'Sethumadhavan']
Added
['Ambili ', 'Ramaguru', 'Praveen', 'Anand', 'Sethumadhavan', 'Ramaguru']
Sorted
['Ambili ', 'Anand', 'Praveen', 'Ramaguru', 'Ramaguru', 'Sethumadhavan']
Count of Ramaguru is 2
Cleared
[]
Exiting Loop
Task Sheet Deleted
Comments