Learn Python Through Real-World Examples 🐍✨ 🚀 Transform from Python beginner to job-ready developer by building practical projects used in real companies! This hands-on tutorial combines Python programming fundamentals with portfolio-worthy projects to help you learn Python the right way.
🔥 What You'll Build & Learn: ✔ Beginner-friendly Python projects (VSCode setup included) ✔ AI & ChatGPT-powered applications (learn how to use ChatGPT for coding help) ✔ Game development projects (fun way to master Python basics) ✔ Advanced Python projects for cybersecurity & data science ✔ Resume-boosting projects that help you get hired faster ✔ Python coding interview questions & solutions
💼 Who Is This For? ✅ Absolute beginners learning Python in English ✅ Software engineers wanting to upskill with real projects ✅ Job seekers needing portfolio projects (with source code) ✅ Students looking to automate tasks with Python & ChatGPT
📌 Key Topics Covered: Python projects playlist from basics to advanced
welcome to the course this is the very
first lecture and in this lecture I'll
give you a short introduction to this
course I'll tell you what the course
covers how how it is structured I'll
mention the different types of content
that you'll find here and I'll let you
know what to expect in terms of goals
you want to reach so the course is
structured into several sections and
sections are nothing more than logical
groupings of several lectures uh now for
instance you are at lecture one of
section one and so in the first section
I'll mention a few facts about python
then I'll show you how to install python
version three and where to write and
execute python code then in section two
you will learn how to declare and use
variables you will also learn how to use
numbers and strings uh which are two
basic data types in Python then once you
have learned variables numbers and
strings in Section 3 you will be ready
to write some tiny programs using
conditionals also in section three you
will learn how to write your own
functions and once you have a good grasp
of of custom functions you will already
start to feel confident in writing lines
of code uh then we will jump over to
section four where you'll learn some
more complex data types that are lists
to both sets and dictionaries uh then
you'll practice these data types as you
learn how to perform iterations using
the for Loop in Section Five I'll go
over to some more practical comp
Concepts where you will learn how to
create and open files and write content
inside these files in in that section
you will also be practicing iteration
combined with the file handling
techniques and then I'll explain to you
all the functionalities that I mentioned
above while typing code executing and
getting the code output however some
things you'll be able to understand by
yourself by completing the exercises
which you will find as you progress
through the course uh that's an
excellent technique because it will keep
you very active and will help you code
independently with confidence there are
also interesting quizzes in the course
that will continuously test your
knowledge and once you have learned all
the building blocks of language I'll
show you the way how you can apply that
knowledge for making python programs
that will solve your problems in your
specific professional field so I'll show
you how to look for special Python
functionalities and how to use them for
programming with python and moreover we
will be building some real world small
programs and then I'll ask you to
improve those programs so that you
understand them better and learn how to
do them by yourself and lastly I'll show
you how to make your python programs
more user friendly so that other people
can also execute them and to sum it up
regardless of the field of Technology
where you're planning to use Python this
this course will get you up and running
fast with python so let's roll and see
you in the next lecture so in this first
lecture I'm going to tell you a few
words about python such as what python
is what it can do uh What fields oft
technology can python be used for uh
where python stands among the other
programming languages and how python has
become so popular so python is
definitely not a large heavy boded non
venous constrictor snake it is a
powerful high level programming language
intended for general purpose so a higher
level language means a language that
enables the development of a program in
much simpler way as opposed to lowlevel
programming languages python as many
other programming languages is a high
level programming language so with
python you'll never have to think about
lowlevel
languages I said earlier that python is
a general purpose language
and it release the languages used in
many fields according to the official
python web page these fields are web and
internet development scientific and
numeric education desktop graphical user
interfaces and software development and
as you see python covers probably
everything that can be done with with a
programming language python is a simple
readable and efficient language if you
were to create a program uh you would
create that program with with much less
lines of code using python that using uh
the C language for example and on top of
that those few lines of python code
would be more readable than the C code
and all that makes python a very
enjoyable programming
language and I bet you'll enjoy whenever
you'll be given a new problem to solve
with python python was conceived in the
late 1980s and python 2 version two was
released in 2000 and Python 3 was
released in 2008 Python 3 is the latest
uh release currently uh there is a
version we are using in this course
today python is one of the most popular
programming languages and its popularity
is increasing so how did python become
so popular well I already mentioned
readability so that's one of the reasons
why why people like and choose to
program with python uh but also Google
is using Python and YouTube was written
in Python also python has a great
community that is always ready to help
other reasons for the popularity of
python can be specific for certain
communities for instance python has a
great support for uh for data analysis
and you can do whatever you like with to
your data so if you're taking this
course uh it's probable that you have
decided to Learn Python 4 handling data
and I'm sure we'll learn a lot and we'll
have a lot of fun programming with
python I believe all you need is time
management so welcome again to this
course and talk to you in the next
lecture welcome to this new lecture and
I assume you have already taken the
previous lecture where I talked about
python in general and the other lecture
as well where I showed you how to
download and install Python and the
spider environment and the IPython
console as well in this lecture I'll
tell you a few things about the spider
environment as that will be the
environment from where I'll be writing
and executing the python
code so the platform we we're looking at
is spider and spider stands for
Scientific Python development
environment don't get scared by the name
spider is just an environment where you
write and run python code so spider
provides an an editor here on the left
and an interactive shell here on the
right the interactive shell is provided
by IPython so IPython is an enhanced
shell where you write and run python
code so IPython is like the basic shell
that you you can access through your
command prompt but with some added
capabilities uh that uh we will discover
together as we move through the course
you can also access IPython 3 your
command line uh by just typing
IPython and you get the same console
with the same functionalities as the one
you have in spider but I would suggest
you use the IPython through through
spider because you have everything
inside one single
environment so to write scripts of code
you should use the editor here on the
left and I have another very short
lecture where I'll teach you how to run
scripts of code to program interactively
you use the shell on the right so
programming interactively means uh
writing and executing single lines of
code uh this is done mostly when when
testing and where you're not intending
to save your your scripts of code for
instance let's instruct python to print
out some text for us so the function
that prints out text is print and the
text we want to print is displaying some
text and so we get the text displayed as
soon as we hit enter on the keyboard so
that's what I refer to as interactive
programming uh you can open multiple
shells or consoles here if you like but
normally you'll not have to do so uh you
can choose to show or hide these two
panes by going
to view panes and then click the pane
you want to show or hide so if I check
the editor the editor will will hide and
I have a full view of the iPod and shell
you could also modify the way your
spider looks by going to tools
and then to
preferences and here you have quite a
lot of displaying options that you can
play around with for example I may want
to remove the header of the IPython
console so I go to IPython and uncheck
that option now the next time I open
spider or even if I start a new console
now the header will have disappeared
there are also options that may become
useful when you're managing big amounts
of code and and script files but but you
don't have to know about them as far as
you're not building big programs so I
think this is enough to know for now in
the next lecture I'll start writing code
right away by explaining the basics of
python so talk to you in the next
lecture well you should already know
that variables in programming are simply
some sort of containers where we can
sort everything as in other programming
languages in Python we can sore numbers
text lists file FES data and all kinds
of objects it is very easy to create a
variable in Python just pick a name for
a variable and store something on it I
creating a variable here and assigning
it a number so potato price equals 3 and
yet another value in this other variable
amount equals
2.5 notice here that we implicitly
declare the data type stored in the
variable in many other programming
languages you'd have to write something
like um int potato price to declare that
the variable will be an integer so int
stands for integer and after that you
store the value inside your
variable in Python however you don't
have to write that much indeed if the
number you are assigning to your
variable is a whole number python
understands that and makes the variable
an integer type but I'll tell you more
about data type in the next lectures for
now let's check the data type that our
variables hold and we can do that using
the type function so we're going to
print out the type of the data that our
variables
hold so to do that type
print and then Open brackets and inside
the brackets we'll write what to print
out on the screen so in this case we
want to print the variable data type and
the data type is generated by the type
function so type and then we pass in the
value in the type function which in this
case is a potato priz
variable so python tells us that the
value of the potato priz variable is an
integer and also let's check the the
other variable as well print again type
and then we enter the other
variable and the value of the other
variable is a floating Point number
called float for short in
and I'll tell you more about data types
in the next lectures and a few more
stuff now uh you can assign any other
values in the existing variables as well
even different data types from what the
variable currently holds so here I'm
going to assign a string to my potato
priz variable strings are like
text but we'll cover that later so
potato price equals fre for
today and the variable will have
discorded this previous value by keeping
the new
one functions functions functions there
are two types of functions builtin and
custom build-in functions are functions
that have already been created by python
authors and are already use from python
programmers which is us the print
function is an example of a building
function but in this lecture we're going
to talk about custom functions and
custom functions are super useful I'll
refer to custom functions as just
functions from now on so a function is
an algorithm written by us that computes
an output given a certain input the key
benefit of function is that you can
write a function only once but you can
use it as many times as you want by just
calling it which is very simple uh here
is how to write a function in Python I'm
going to create a function here that
calculat play the cast of potatoes given
the price and the amount so we use the
word the keyword def to tell python that
we are about to define a function and
after that we choose a name for our
function I'll name my function uh potato
coast once we write the function name we
set the input parameters for the
function and we can now write what the
function will compute and what it return
as an output in this case we want to
compute the cost of
potatoes given the price and the amount
so cost equals potato price times amount
and we also want let's say to print out
the potato
type now we we are printing out the
potato type but we also want to return
the calculated
cost when the function is executed later
we can either do it using the pr
function or we can use a return keyword
I'm using the return keyword here and
see now how easy is to call the function
once we have created it so potato codes
and we write the values which are called
attributes now uh notice that we are
inputting values for each of the
parameters in the given order and what
we get is the printed potato type and
the computed cast you can now execute
the function as many times as you want
using different values and the last
thing to mention here is that we wrote
Our function in the IPython console as I
have told you before this is a platform
for testing if we close the IPython
console we will lose our function
definition and we will not be able to
call it anymore so normally uh we want
to sore our function in a script for
later use in that case we have to write
it in a DOT P script
once we do that we can reuse a function
in the future so that was how to define
and call a
function as far as data types are
concerned we have so far mentioned
integers strings and floats now you're
going to learn two other data types that
are list and Toes both lists and tobl
are often referred to as sequences
because they are SE quences of objects
let's start with lists lists are the
most important between the two so let's
start talking about lists list is a
sequence of objects and these objects
can be numbers strings files and many
other data types let's create a list of
integers I'm going to call my list file
list and add three
integers in the list and let's quickly
see what we got so it's a list of
integers now uh each value of the list
is called the list item lists are
extensively use when automatically
performing multiple actions or iterating
if you like if you want to add more
items to a list you can use aen method
so aen is a list method that adds a new
element at the end of the list and we
use the dot notation to apply a method
to an
object now uh lists are indexed meaning
that every element of the list every
item of the list has a certain index
starting from zero so for our list
2015 holds an index of zero 2016 has an
index of one and
2017 has an index of two indexes are
useful when we want to access certain
items of the list for instance if we
want the second element we call the
element with index
one we write the list name and the index
of the item we want to call inside
square brackets and we get the second
item and this item behaves just like an
independent object for example in this
case we have an
integer as you see now you saw that we
were able to modify a list and we did
that by adding an item at the end of our
list some sometimes you don't want your
list to be modified for some reason and
in such cases we use toles to create a
tole just use this
syntax so to declare list we use square
brackets for toes we use round brackets
it is rare to use toles but in case you
want your series to be immutable toles
are always there for you so you just
learn what list and Tes are and more
data types in the next lecture
as far as data types are concerned we
have so far mentioned integers strings
and floats now you're going to learn two
other data types that are lists and
toles both lists and to are often
referred to as sequences because they
are sequences of objects let's start
with lists lists are the most important
between the two so let's start talking
about list list is a sequence of objects
and this object objects can be numbers
strings files and many other data types
let's create a list of integers I'm
going to call my list file
list and add three
integers in the list and let's quickly
see what we got so it's a list of
integers now uh each value of the list
is called the list item lists are
extensively used when automatically
performing multiple actions or iterating
if you like if you want to add uh more
items to a list you can use a pen method
so append is list method that adds a new
element at the end of a list and we use
a DOT notation to apply a method to an
object now uh lists are indexed meaning
that every element of the list every
item of the list has a certain index
starting from zero so for our list 2015
holds an index of zero 2016 has an index
of one and
2017 has an index of two indexes are
useful when we want to access certain
items of the list for instance if we
want the second element we call the
element with index one we write the list
name and the index of the item we want
to call inside square brackets and we
get the second item
and this item behaves just like an
independent object for example in this
case we have an
integer as you see now you saw that we
were able to modify a list and we did
that by adding an item at the end of our
list sometimes you don't want your list
to be modified for some reason and in
such cases we use topples to create a
tole just use this syntax
so to declare list we use square
brackets for toes we use round brackets
it is rare to use toles but in case you
want your series to be immutable tles
are always there for you so you just
learn what list and Tes are and more
data types in the next
lecture in this lecture you will learn
about sets and dictionaries remember
lists and TOS were referred to as
sequences well sets and dictionaries are
referred to as collections because they
are unordered collections of items let's
start explaining sets a set is an
another collection of unique items and
remember unique items not duplicate
items allowed in a set uh we can create
a site using curly brackets just like
this let's say file
set and I'll store three integers in my
set a simple and practical use of sets
now is when you have a list that has
duplicate items and you want to remove
those duplicate items from it let's say
you have this list file list okay and we
have two duplicate items and to make a
sequence of unique elements you have to
convert it to a set object and we can
convert a list to a set object using the
set function when you do that duplicates
will be removed automatically
so we are sort of updating our file this
variable with a new value in this line
of code uh this new value will be a set
that is generated by converting the the
list object to a set object so now
printing the file list will reveal that
duplicate items have been removed and we
now have a set object not a list anymore
and that is because we converted our
list to a
set but don't believe me and check the
type of the object
always
so if you want to retain your list data
type you can convert the set back to a
list using the list function this time
so file list equals list and we pass the
set object to the list
function more data types
now dictionaries let's try to explain
them by making a comparison with list so
in the of lists we were able to access
items using their indexes for
dictionaries we can access items using
index is declared explicitly by us
here's the dictionary I'll call my
dictionary file dict and we use curly
brackets to Define dictionary and then
we write the index a column and a
corresponding item so don't forget that
each item has its own data type so if
you use quotes for an item that makes
that particular item a string and so on
the items in this case are 2015 2017 and
2019 and they are referred to as values
so remember values when we talking about
dictionaries and the indexes are last
year this year and next year and they
are referred to as keys so what we are
dealing here is an object constructed by
pairs of keys and Val
now in the case of list and tops we were
able to access items using the default
indexes in the case of dictionaries you
can access the dictionary values using
their corresponding keys and that will
return the value attached to the year
key remember that once we opened a file
we had to close it later using the close
method well in this lecture you're going
to learn a more solid way that closes a
file for you once it has finished
working with it and the solid method is
called width so you will learn the WID
method in this lecture before we did
this to open a file we created a
variable and then we use the open method
to open a
file and then we use the write method to
write something in that
file and later on we had to close that
file what you you want to do instead is
write a width statement so to write a
width statement follow this syntax start
with a with keyword and then we write
the open method the file path the
writing method and then the
variable the next line then is used to
write the actions that we want to
perform on the open file in this case we
would like to write a line for example
so don't forget to indent the second
line again we use indentation for the
WID
method and so how do we read this
statement well just like this with the
open test induct txts file we perform
the actions in the next line uh the
benefit here is that the with method
will close the file for us once the the
action below it have been completed so
it's a very comp method that is highly
recommended so what you're looking at is
a script you wrote in the previous
exercise and what you basically did
there is that you asked you asked the
user to enter some input so the user
enter a longitude and a Latitude value
and then you pass these values uh to the
new Point method uh in this lecture I'll
show you how to actually generate a KL
file out of a CSV file
uh this is a more efficient way compared
to the previous method so compared to
the existing script you're looking at
now uh because using a CSV file you can
actually pass many many longitude and
latitude values at the same time and get
a KL file generated so now you have to
think how do we get the data out of the
CSV file well I think I already taught
you that you can use the panas library
to do just that panas is powerful data
analysis library and it can efficiently
read CSV data and manipulate them so I'm
going to delete these two lines here
okay and import the panas
library great uh now the C file I'm
talking about is this one here so we
have two columns and four rows and I'm
going to Kip my file here and my spider
here good so what we want to do now is
is create a data frame
object and we use a CSV method for that
and here we pass in the path of the CSV
file so now we we already have the data
of the CSV file inside Python and we
keeping them in the data frame object
what we want to do now is create a for
Loop which will iterate through all
these four rows and then it will execute
the new Point method four times so the
new Point method we'll get the longitude
and latitude values for each of these
rows so the idea is that we have to
start the loop above the new Point
method so let's say
four loan
let
in okay so so far I taught you how to
iterate with one variable but not with
two variables at the same time so you
used to iterate with one variable
through a single list
here to iterate with two variables in
two lists we have to use a zip function
so the zip function allows you to
iterate through two Leist at the same
time and now our lists are the first
lease will is going to be the longitude
column so to access such a Leist we we
call the data frame and then in the
square brackets we write the column name
of the data frame which is
longitude and then we're passing the
second list which is latitude great
that's the idea uh now you want to
indent this line here and we don't have
any name column in our CSV so I'm going
to delete this and then the arguments
that we pass here to the course
parameter have to reflect the names of
variables here so I'm going to pass loan
and let and that's it uh we have
something here it says invalid syntax of
course we have an added the colum here
and that's it and we don't want to
iterate through the save method because
the idea here is that we will create
Four Points using the new Point method
and then once these points have been
added to the object then we just save
this object to a caml file great let's
run
now and we have an error so the error
has to do with a long tud uh string and
of course passage for the wrong name
because the correct name is longitude
great let's execute again now and let's
check the KML file so now we should
expect Four Points in the KL
file and that's how it
is so in this uh lecture we leveraged
the the CSV data to create a KML file
and you may never have to create KML
files in your life but you may have to
process CSV files and the pandas library
is a great library for that and here you
saw how to efficiently iterate through
the rows of a CSV file so hope you learn
something from this lecture and see you
in the next lecture all right we have
this Python program which if
executed say Python and script
name we get this graphical user
interface which works great
great and does the work the problem is
that if you want to give this program to
someone else who don't have python
skills or or they don't even have python
installed in their computer they
wouldn't be able to execute your script
and get the KML file at the end so what
you can do in this case is produce an
executable file and that would be a XF
file on Windows and app if you are on a
Mac then you can just give that
that exit file to someone and they can
execute it and get the results so to
make such a program such an executable
file you'd want to use a python Library
called Pi
installer to install the
library you use
pip all right my P installer was already
installed there so I can just go ahead
and use it now notice that I am in uh
the C temp directory which is where my
file is located and now I can just call
P
iner and then the tab to get the script
name note that we are in the command
line here in the terminal so I have an
open Python and if we leave this
expression as it is now uh we would
actually get a bunch of files and among
them would be thexa file this method is
good that uh in that if uh some problem
happens you would be more able to
actually troubleshoot the problem and
and go to the specific file that caused
the problem and then maybe solve the
problem but if you want a single file a
single. xit file or a single. app file
for Mac You' want to add a parameter
here called one file and there's yet
another parameter you would want to
add and that's the window parameter the
window parameter will create a single
window for your uh program so without a
command prompt on the on the background
and that's it you execute this and You'
have to wait a while until the process
finishes and that was apparently
successful but let's
check your executable file should be
inside the this folder and here it is
so it's the same
program and does the same thing if you
want to give this program to someone you
can just send the XA file and they will
be able to execute it without needing
python installed and that wraps up uh
this section hope you enjoy that thank
you