Compulsory TaskFollow these steps:● Create a copy of your previous Capstone project (task_manager.py) andsave it in the Dropbox folder for this project. Also, copy andpaste the textfiles ( user.txt and tasks.txt ) that accompanied the previousCapstoneproject to this folder. Modify this program as follows:● Modify the code of your previous project so that functions areused.Adding functions will improve the modularity of your code. Yourprogramshould include at least the following functions:o reg_user — that is called when the user selects ‘ r ’ to registera user.o add_task — that is called when a user selects ‘ a ’ to add a newtask.o view_all — that is called when users type ‘va’ to view all thetaskslisted in ‘tasks.txt’.o view_mine — that is called when users type ‘vm’ to view allthetasks that have been assigned to them.● Modify the function called reg_user to make sure that you don’tduplicateusernames when you add a new user to user.txt . If a user tries toadd ausername that already exists in user.txt , provide a relevant errormessageand allow them to try to add a user with a differentusername.● Add the following functionality when the user selects ‘vm’ toview all thetasks assigned to them:o Display all tasks in a manner that is easy to read. Make surethateach task is displayed with a corresponding number which canbeused to identify the task.o Allow the user to select either a specific task by entering anumberor input ‘-1’ to return to the main menu.o If the user selects a specific task, they should be able tochoose toeither mark the task as complete or edit the task . If theuserchooses to mark a task as complete, the ‘Yes’/’No’ value thatdescribes whether the task has been completed or not shouldbechanged to ‘Yes’. When the user chooses to edit a task, theusername of the person to whom the task is assigned or theduedate of the task can be edited. The task can only be edited if ithasnot yet been completed.
Add an option to generate reports to the main menu of theapplication.The menu for the admin user should now look something like this:THE MENU LOOKS AS IT SHOULD IN THE CODE GIVEN● When the user chooses to generate reports, two text files,calledtask_overview.txt and user_overview.txt , should be generated.Boththese text files should output data in a user-friendly, easy toread manner.o task_overview.txt should contain:▪ The total number of tasks that have been generated andtracked using the task_manager.py .▪ The total number of completed tasks.▪ The total number of uncompleted tasks.▪ The total number of tasks that haven’t been completed andthat are overdue.▪ The percentage of tasks that are incomplete.▪ The percentage of tasks that are overdue.o user_overview.txt should contain:▪ The total number of users registered with task_manager.py .▪ The total number of tasks that have been generated andtracked using the task_manager.py .▪ For each user also describe:▪ The total number of tasks assigned to that user.▪ What percentage of the total number of tasks havebeen assigned to that user?▪ What percentage of the tasks assigned to that userhave been completed?▪ What percentage of the tasks assigned to that usermust still be completed?▪ What percentage of the tasks assigned to that userhave not yet been completed and are overdue?● Modify the menu option that allows the admin to displaystatistics so thatthe reports generated are read from task_overview.txt anduser_overview.txt and displayed on the screen in a user-friendlymanner
If these text files don’t exist (because the user hasn’tselected to generatethem yet), first call the code to generate the text files.
****PREVIOUS CODE****
Compulsory Task Follow these steps: ● Create a copy of your previous Capstone project ( task_manager.py) and save it in
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Compulsory Task Follow these steps: ● Create a copy of your previous Capstone project ( task_manager.py) and save it in
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!