Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Ive sent this question a million times already. The subscription went high, let the quality of work do the same. Compulsory Task 1 Follow these

Ive sent this question a million times already. The subscription went high, let the quality of work do the same.
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Compulsory Task 1 Follow these steps- - Create a copy of your previous Capstone project [task_manager.py] and save it in the Dropbox folder for this project. Also, copy and paste the text files (user.txt and tasks.txt) that accompanied the previous Capstone project to this folder. Modify this program as follows: - Modify the code of your previous project so that functions are used. Adding functions will improve the modularity of your code. Your program should include at least the following functions: reg. user - that is called when the user selects ' f ' to register a user. add_task - that is called when a user selects ' o ' to add a new task. view_oll - that is called when users type 'va' to view all the tasks listed in 'tasks txt' - view_mine - that is called when users type 'vm' to view all the tasiks that have been assigned to them. - Modify the function called reg_user to make sure that you don't duplicate usernames when you add a new user to user.txt. If a user tries to add a username that already exists in user.txt, provide a relevant error message and allow them to try to add a user with a different username. - Add the following functionality when the user selects 'vm' to view all the tasks assigned to them: Display all tasks in a manner that is easy to read. Make sure that each task is displayed with a corresponding number which can be used to identify the task Allow the user to select either a specific task by entering a number or input ' to return to the main menu. If the user selects a specific task, they should be able to choose to either mark the task as complete or edit the task. If the user chooses to mark a task as complete, the 'Yes'/No' value that describes whether the task has been completed or not should be changed to 'Yes' When the user chooses to edit a task the username of the person to whom the task is assigned or the due date of the task can be edited. The task can only be edited if it has not yet been completed. and the password, 'admln'. The username and password for each user must be written to this file in the following format: - First, the username followed by a comma, a space and then the password. - One username and corresponding password per line. Your program should allow your users to do the following: Login. The user should be prompted to enter a username and password. A list of valid usernames and passwords are stored in a text file called user.txt. Display an appropriate error message if the user enters a username that is not listed in user.txt or enters a valid username but not a valid password. The user should repeatedly be asked to enter a valid username and password until they provide appropriate credentials. The following menu should be displayed once the user has successfully logged in: Please select one of the following options: r - register user a - add task va - view all tagks vu - view my tasks e - exit If the user chooses ' r ' to register a user, the user should be prompted for a new username and password. The user should also be asked to confirm the password. If the value entered to confirm the password matches the value of the password, the username and password should be written to user.txt in the appropriate format. If the user chooses ' a ' to add a task, the user should be prompted to enter the username of the person the task is assigned to, the title of the task, a description of the task and the due date of the task. The data about the new task should be written to tasks.txt. The date on which the task is assigned should be the current date. Also assume that whenever you add a new task, the value that indicates whether the task has been completed or not is 'No'. - If the user chooses 'va' to view all tasks, display the information for each task on the screen in an easy to read format. If the user chooses ' vm ' to view the tasks that are assigned to them, only display all the tasks that have been assigned to the user that is currently logged-in in a user-friendly, easy to read manner. Compulsory Task Part 2 1. Now format your program so that: a. Only the user with the username 'admin' is allowed to register users. b. The admin user is provided with a new menu option that allows them to display statistics. When this menu option is selected, the total number of tasks and the total number of users should be displayed in a user-friendly manner. "Capstone template project for FCS Task 19 Compulsory task 1. This template provides a skeleton code to start compulsory task 1 only. Once you have successfully implemented compulsory task 1 it will be easier to add a code for compulsory task 2 to complete this capstone' \#======importing libraries=========== ''This is the section where you will import libraries 1 ' \#====Login Section==== "'Here you will write code that will allow a user to login. - Your code must read usernames and password from the user.txt file - You can use a list or dictionary to store a list of usernames and passwords from the file. - Use a while loop to validate your user name and password. while True: \#presenting the menu to the user and \# making sure that the user input is coneverted to lower case. menu = input("'select one of the following 0ptions below: r - Registering a user a - Adding a task va - View all tasks vm - view my task e - Exit : 1 ). Lower() if menu ==r : pass "In this block you will write code to add a new user to the user.txt

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions