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
- Go to python.org
- 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
task.py – Defines what a task is (blueprint)
main.py – Main menu and user interaction logic
๐️ task.py
๐️ main.py
๐️ 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
๐ง๐ป 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
Post a Comment