0% found this document useful (0 votes)
24 views2 pages

Python CLI Task Manager Project

The document outlines a one-day assignment for a junior developer to create a command-line interface (CLI) application for managing tasks using Python. The application should allow users to add, view, delete, and mark tasks as complete, as well as save and load tasks from a JSON file. Deliverables include the application code, a README file with project details, and adherence to specified functionality and code quality criteria.

Uploaded by

hnbhat.jsp
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

Python CLI Task Manager Project

The document outlines a one-day assignment for a junior developer to create a command-line interface (CLI) application for managing tasks using Python. The application should allow users to add, view, delete, and mark tasks as complete, as well as save and load tasks from a JSON file. Deliverables include the application code, a README file with project details, and adherence to specified functionality and code quality criteria.

Uploaded by

hnbhat.jsp
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

One-Day Assignment for Junior Developer – Python Assignment

Project Title: Task Manager CLI Application

Objective: Build a command-line interface (CLI) application to manage tasks. The application
should allow users to add, view, and delete tasks, as well as save and load tasks from a file.

Tasks Breakdown

1. Project Setup

o Create a new directory for the project, e.g., task_manager.

o Inside the directory, create a Python file named task_manager.py.

2. Define Task Structure

o Create a simple Task class to represent a task. Each task should have the
following attributes:

▪ id: an integer for the task ID.

▪ title: a string for the task title.

▪ completed: a boolean indicating if the task is completed.


3. Implement Task Management Functions

o Implement functions to handle the following functionalities:

▪ Add a Task: Allow the user to add a new task to the task list.

▪ View Tasks: Display all tasks, showing their status (completed or not).

▪ Delete a Task: Allow the user to remove a task by its ID.

▪ Mark Task as Complete: Update the task status to completed.

4. File Handling

o Implement functions to save and load tasks to/from a file using JSON:

▪ Save Tasks: Save the list of tasks to a file named [Link].

▪ Load Tasks: Load tasks from [Link] when the application starts.

5. Create a Command-Line Interface

o Use a simple loop to create a CLI that allows the user to interact with the
application:

▪ Display a menu with options to add, view, delete, complete tasks, and
exit the application.

▪ Use input to get user commands and execute the corresponding


functions.

6. Documentation

o Create a [Link] file that includes:


▪ Project title and description.

▪ Instructions on how to run the application (e.g., python


task_manager.py).

▪ Overview of functionalities implemented.

Expected Deliverables

• A complete CLI task manager application (task_manager.py).

• Source code with clear and concise comments.

• A [Link] file with project details.

Assessment Criteria

• Functionality: The application works as intended with all specified features.

• Code Quality: Code is clean, well-structured, and appropriately commented.

• User Experience: The CLI is user-friendly, and instructions are clear.

Common questions

Powered by AI

The user-friendliness of the CLI is ensured by providing clear instructions and a simple menu interface that allows users to easily input commands and execute functions without confusion. This enhances the overall user experience .

The essential components include creating a new directory for the project, such as 'task_manager', and inside this directory, a Python file named 'task_manager.py' should be created .

Functions to handle adding a task, viewing all tasks with their completion status, deleting a task by ID, and marking a task as complete need to be implemented. Additionally, file handling functions to save tasks to a file named 'tasks.json' and load tasks from this file when the application starts are also required .

Functionality should be evaluated based on whether the application works as intended with all specified features, including adding, viewing, deleting, and completing tasks, as well as correctly saving and loading tasks to/from a file .

Marking tasks as complete is important because it allows users to update the status of their tasks, reflecting progress towards their goals. This function enhances usability by providing a visual indicator of task status, aiding users in managing and organizing their responsibilities more effectively .

Clear code commenting contributes to quality assessment by helping maintain clean, well-structured code that is easy to understand and manage. It ensures that other developers can quickly grasp the function and purpose of different code segments within the application .

The README.md file should include the project title and description, instructions on how to run the application (e.g., using 'python task_manager.py'), and an overview of the functionalities implemented in the application .

A simple loop should be used to create a CLI that displays a menu with options to add, view, delete, complete tasks, and exit the application. The application should use input from the user to execute the corresponding functions .

The task structure can be defined by creating a simple Task class with attributes including an integer 'id' for the task ID, a string 'title' for the task title, and a boolean 'completed' indicating if the task is completed .

The task data is retained by saving the list of tasks to a file named 'tasks.json'. This JSON format allows tasks to be loaded when the application starts, ensuring data persistence .

You might also like