An educational Jupyter notebook project developed by DNC to teach fundamental Python concepts through practical task management implementation.
Overview • Features • Installation • Usage • Notebook Structure • Learning Objectives • Technologies • Contributing • License
This project is a comprehensive task management system implemented in Python using Jupyter notebooks as part of DNC's (Digital Nation Course) educational curriculum. The system demonstrates essential programming concepts through a practical application that allows users to manage tasks with different priority levels.
The project serves as an interactive learning experience, combining theoretical concepts with hands-on implementation in a notebook environment that facilitates experimentation and learning.
- Add Tasks: Create new tasks with descriptions and priority assignments
- Remove Tasks: Delete specific tasks from the system
- List Tasks: Display all current tasks with their priority levels
- Save Tasks: Persist task data to files for future sessions
- Interactive Menu: User-friendly command-line interface
- High Priority: Critical tasks requiring immediate attention
- Medium Priority: Important tasks with moderate urgency
- Low Priority: Tasks that can be completed when time permits
- Step-by-step Implementation: Code broken down into digestible sections
- Concept Explanations: Detailed explanations of Python concepts used
- Interactive Examples: Live code cells for experimentation
- Python 3.7 or higher
- Jupyter Notebook or JupyterLab
- Basic understanding of Python syntax
- Clone the repository:
git clone https://github.com/Laurentius96/Priority_Task_Manager.git- Navigate to project directory:
cd Priority_Task_Manager- Run the
main.ipynbnotebook in a Jupyter environment:
jupyter notebook main.ipynb- Alternatively, run the script directly:
python -m main.pyThe notebook is structured in sequential cells that build upon each other. Execute cells in order using Shift + Enter.
Task Data Structure:
# Example task structure used in the notebook
tasks = [
{"description": "Study Python", "priority": "High"},
{"description": "Go to gym", "priority": "Medium"},
{"description": "Buy groceries", "priority": "Low"}
]Adding a Task Function:
def add_task(tasks, description, priority):
"""
Add a new task to the task list
Parameters:
tasks (list): Current list of tasks
description (str): Task description
priority (str): Task priority level
"""
new_task = {"description": description, "priority": priority}
tasks.append(new_task)
print(f"Task '{description}' added with {priority} priority!")
return tasksExpected Output:
Task 'Study Python' added with High priority!
Current tasks: 3
def display_menu():
print("\n=== TASK MANAGER ===")
print("1. Add Task")
print("2. Remove Task")
print("3. List Tasks")
print("4. Save Tasks")
print("5. Exit")
return input("Choose an option (1-5): ")Sample Execution Result:
=== TASK MANAGER ===
1. Add Task
2. Remove Task
3. List Tasks
4. Save Tasks
5. Exit
Choose an option (1-5): 3
=== CURRENT TASKS ===
1. Study Python - Priority: High
2. Go to gym - Priority: Medium
3. Buy groceries - Priority: Low
task_manager.ipynb
├── 1. Introduction & Setup
│ ├── Project overview
│ ├── Learning objectives
│ └── Import statements
├── 2. Data Structures
│ ├── Task representation
│ ├── List operations
│ └── Dictionary usage
├── 3. Core Functions
│ ├── add_task()
│ ├── remove_task()
│ ├── list_tasks()
│ └── save_tasks()
├── 4. Control Flow
│ ├── Menu system
│ ├── User input handling
│ └── Conditional logic
├── 5. File Operations
│ ├── Saving to file
│ ├── Loading from file
│ └── Error handling
├── 6. Main Program Loop
│ ├── Interactive execution
│ ├── Menu navigation
│ └── Program termination
└── 7. Exercises & Extensions
├── Practice problems
├── Enhancement ideas
└── Further learning resources
This notebook teaches the following Python concepts through practical implementation:
- Lists: Managing collections of tasks
- Dictionaries: Storing task attributes
- Data manipulation: Adding, removing, and modifying data
- Conditional statements: Menu navigation and decision making
- Loops: Iterating through task collections
- Function definitions: Code organization and reusability
- Writing files: Persisting task data
- Reading files: Loading saved tasks
- Error handling: Managing file operations safely
- Input validation: Ensuring data integrity
- Menu systems: Creating user-friendly interfaces
- Output formatting: Presenting information clearly
- Python 3.x: Core programming language
- Jupyter Notebook: Interactive development environment
- Built-in Libraries:
os: File system operationsjson: Data serialization (optional enhancement)
- Pandas: Data manipulation (for advanced features)
def list_tasks(tasks):
"""Display all tasks with their priorities"""
if not tasks:
print("No tasks available.")
return
print("\n=== CURRENT TASKS ===")
for i, task in enumerate(tasks, 1):
print(f"{i}. {task['description']} - Priority: {task['priority']}")Execution Result:
# Sample execution in notebook cell
tasks = [
{"description": "Complete Python project", "priority": "High"},
{"description": "Review code documentation", "priority": "Medium"}
]
list_tasks(tasks)Output:
=== CURRENT TASKS ===
1. Complete Python project - Priority: High
2. Review code documentation - Priority: Medium
def save_tasks_to_file(tasks, filename="tasks.txt"):
"""Save tasks to a text file"""
try:
with open(filename, "w") as file:
for task in tasks:
file.write(f"{task['description']},{task['priority']}\n")
print(f"Tasks saved to {filename} successfully!")
except Exception as e:
print(f"Error saving tasks: {e}")Expected Result:
Tasks saved to tasks.txt successfully!
File created: tasks.txt
Content preview:
Complete Python project,High
Review code documentation,Medium
The project can be extended with additional features:
- Task Categories: Group tasks by work, personal, etc.
- Due Dates: Add deadline tracking functionality
- Task Status: Implement completed/pending status
- Data Visualization: Create charts showing task distribution
- Export Options: Save tasks in different formats (CSV, JSON)
This educational project welcomes contributions to improve the learning experience:
- Fork the repository
- Create a feature branch (
git checkout -b feature/educational-enhancement) - Make your changes with clear documentation
- Add examples and explanations for new concepts
- Submit a pull request with detailed description
This project is part of DNC's educational curriculum and is available for learning purposes.
CC BY-NC-ND 4.0 License
This repository is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
- ✅ You can share — You are free to copy and redistribute the material in any medium or format
- ❌ No commercial use — You may not use the material for commercial purposes
- ❌ No derivatives — You may not remix, transform, or build upon the material
- ✅ Attribution required — You must give appropriate credit, provide a link to the license, and indicate if changes were made
For the complete license terms, please see the LICENSE.md file.
- Python Documentation: python.org
- Jupyter Notebook Guide: jupyter.org
- Data Structures Tutorial: Additional learning materials in the notebook
Developed with 💙 by Lorenzo C. Bianchi feat. DNC Educational Team
Learning through practice - building real solutions with code!