Getting Started with Python: A Beginner's Guide with a Task Manager Project

Learn Python by Building a Task Manager App

(Perfect for Beginners)




 

๐Ÿ‘‹ Introduction 

Python is one of the easiest and most powerful programming languages. It is widely used in fields like web development, automation, AI, data science, and more.

In this blog, we’ll :

  • Learn the basics of Python
  • Understand how to write simple programs

  • Build a Task Manager App at the end

Even if you are a beginner, this guide is for you.





๐Ÿ”ง What is Python?

Python was created by Guido van Rossum in 1991. Its main goal is to make programming fun and easy. Big companies like Google, Netflix, NASA, and YouTube use Python daily.

Why is Python Great for Beginners?

  • Simple, clean syntax (easy to read and write)
  • Large community and library support
  • Works across many platforms (Windows, Linux, Mac)



๐Ÿ–ฅ️ Setting Up Python

Step 1: Install Python

  • Download and install the latest version
  • Make sure to check “Add Python to PATH” during installation

Step 2: Check Installation

Open your terminal or command prompt and type:

    python –version

You should see something like Python 3.x.x.

If you see something like this, it means Python was successfully installed on your PC.


๐Ÿ“˜Python Basics

Let’s learn a few essential concepts:


๐Ÿ“Œ Hello, World!

When we want to print something , we can use print( " xxxxx " )

print("Hello, world!")


๐Ÿ“Œ Variables

A variable is a name for a value. We use it to store data (like names, numbers).

name = "Isuru"

age = 21


๐Ÿ“Œ Data Types

Why use? Different types of data need different types.

Types:

  • int – whole numbers [x=21]
  • float – decimals [pi=3.14]
  • str – text [text="Isuru"]
  • bool – True/False [done = True]

๐Ÿ“Œ Lists

We use list to store multiple items in one variable. Can add/remove items.

tasks = ["Work", "Play"]


๐Ÿ“Œ Dictionaries

Like a label and its value. Use to store data with keys and values.

student = {"name": "Isuru", "age": 20}


๐Ÿ“Œ If-Else

This use to make decisions in code.


if age >= 18:

    print("Adult")

else:

    print("Child")


๐Ÿ“Œ Loops

Loops use to repeat actions.

  • for – for a known number of times
  • while – until a condition is false


for task in tasks:

    print(task)


๐Ÿ“Œ Functions

Use to group code and reuse it.

def greet():

       print( "Hello!" )



๐Ÿ“‚ File Handling


๐Ÿ“Œ Why file handling?

To save data (like tasks) and read it back later.

 

๐Ÿ“Œ Write to file

Creates or replaces content

with open("file.txt", "w") as f:

    f.write("Hello")

 

๐Ÿ“Œ Read from file

To get content from file

with open("file.txt", "r") as f:

    print(f.read())


๐Ÿ“Œ Append to file

Add new content to file without deleting old

with open("file.txt", "a") as f:

    f.write("New line\n")

 

๐Ÿ“Œ Read line by line

Better for big files

with open ( "file.txt", "r" ) as f:

    for line in f:

        print (line.strip())


๐Ÿงฑ Object-Oriented Programming (OOP)


๐Ÿ“Œ Why OOP?

It use to organize code better using real-world style.
We use classes and objects.

 

๐Ÿ“Œ Class

Blueprint of an object.

class Task:

    def __init__ (self, title):

        self.title = title

 

๐Ÿ“Œ Object

Actual thing made using a class.

t1 = Task( "Buy milk" )

 

๐Ÿ“Œ Method vs Function

  • Function: normal reusable code
  • Method: function inside a class

class Task:

    def mark_done(self):

        print("Done!")

 

๐Ÿ“Œ Self keyword

Used to access object’s own data inside class.

self.title = title



๐Ÿง  Mini Project – Task Manager App

Create a simple app to add, view, and mark tasks as done using Python.

 

๐Ÿ“‹ Requirements & Methods

 Feature

 Method/Concept Used

 Why We Use It

 Add a task

 append() on list

 To add new tasks to our list

 View tasks

 for loop, enumerate()

 To print tasks one by one with numbers

 Mark as done

 Object property done

 To update task status

 Store tasks

 File write/read

 To save tasks even after closing app

 Structure app

 Classes (OOP)

 Easy to manage task features





๐Ÿ“ Project Folder Structure

task_manager/

├── task.py      Task class (OOP)

├── main.py      App menu and logic

└── tasks.txt    Saved task data


tasks.txt – Stores task list (file memory)
task.py – Defines what a task is  (blueprint)
main.py – Main menu and user interaction logic


๐Ÿ—‚️ task.py




๐Ÿ—‚️ main.py




๐Ÿ—‚️ task.txt 


Create new empty txt file in task_manager named by task.txt


๐Ÿงช Run the Program

In the Command Prompt, navigate to your folder:

cd C:\Users\YourName\Documents\task_manager

Replace YourName with your Windows username or correct path.

Then,  python main.py

Your app will start running ! ✅✅✅


๐Ÿง‘‍๐Ÿ’ป What You'll See:


 

๐Ÿ Conclusion

Congratulations! ๐ŸŽ‰ You’ve just built a simple but functional Task Manager App using Python. Along the way, you learned how to:

  • Use Python classes and functions
  • Handle user input and save data to files
  • Run your project from the terminal or VS Code

This is just the beginning — as you continue learning Python, you can improve this app by adding features like:

  • Due dates and priorities
  • A simple GUI (using Tkinter or PyQt)
  • Saving data in JSON or SQLite

Keep experimenting, building, and learning. Every small project like this helps you grow as a developer!

 

๐Ÿ™Œ Thanks for Reading!

If you found this blog helpful, feel free to share it or leave a comment.
Happy coding!
๐Ÿ’ป✨




Comments