0% found this document useful (0 votes)
12 views

Python Assignment - Junior

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
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Python Assignment - Junior

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
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

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 tasks.json.

▪ Load Tasks: Load tasks from tasks.json 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 README.md 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 README.md 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.

You might also like