Afrikaans
Akan
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Hello everyone!
Recently,
I decided to relearn the Python core from EpoM.
It's a part of data software engineering course.
Yeah, I have go through all the models here and I decided to share my experience and also
explain the most of the concepts like human being.
Let's
get started from the lesson one introduction.
Okay, firstly,
welcome to Python Core.
Yep, let's get started.
We will learn in this
module about the Python,
about development environment,
its data types, functions,
models and pickades.
And last but not least,
the object oriented programming in Python,
how it looks like.
Let's move on.
Okay,
introduction.
Why you should choose Python or you should learn the Python?
Actually,
Python is beginner friendly,
multi-purpose,
high demand nowadays,
and it also has a wide community.
Python is one of the most fast-growing programming language.
It's just everywhere from web programming
to AI,
artificial intelligence.
In this module, we will learn about types of programming languages, introduction to Python,
just we will interact,
we will code some problems.
Okay,
types of programming language.
What we have?
There is a table we have,
you can see the its ranking,
Python as a first,
according to TIOP index programming language.
It's divided into five by purpose,
by level of abstraction, programming paradigm,
implement action and typing strategy.
Let's talk about the purpose.
We have general purpose and special programming language.
For general, we can say
Python,
Rust,
Java,
Lease,
it's used for various tasks.
For special programming language,
it's oriented for solving the specific task,
like SQL,
for database or MAPL for mathematical computations.
And we have level of abstraction,
low level languages or high level language.
For low-level language,
machine code or assembler.
For high-level language,
it's Python,
Java, Ruby and JavaScript.
Why?
Because it sends indirect calls to the operating system using abstraction level.
Low-level language will send the direct calls.
Difference is this.
Direct calls, but high-level language is indirect calls.
And it uses the compiler or interpreter to translate them to
operating system to machine code.
Okay, next, programming paradigm.
We have declarative
paradigm like HTML or SQL.
Like it says, you don't need to know about how browser renders the HTML.
You just describe what you want to see.
You have the results.
Same with SQL.
For imperative paradigm,
Python,
Java,
the main goal of imperative programming is to describe the process,
functional programming.
We can say part of declarative programming,
which has a chain of function calls.
Like you can see in the image program function, function,
function, result will go, move on, move on, move on,
like this.
It has some advantages and disadvantages like recursion deeps.
As you can see there,
it will continue and go deeper and deeper.
And for advantages,
I can highlight it's easier to understand.
Object-oriented paradigm.
Like here, you can see in the image
and class car and objects like BMW and Mercedes inherited from the class car.
Because this is the car and this is the car.
Just the model is
different.
Advantages,
it's parallel development.
Each team member can work independently with their own model or classes.
And also it's scalable
and maintainable.
For disadvantages,
it can be inefficient.
Using OOP can increase CPU usage.
And also unnecessary class that can lead to duplications.
Let's move on.
Procedural paradigm.
It's also part of imperative programming.
Advantages is easy to reuse.
Also it can seem as less memory.
But in the disadvantages,
we can see there is no data production.
It's also difficult to handle errors.
And example Pascal or other programming language.
And for implementation,
we have two types.
Compilot and interpreted.
For Compilot language,
we can say it's C,
go programming language.
Because it will translate the source code from
high-level programming language,
lower-level language.
And it leads to faster execution.
Because as you can see in the image, language,
it's compiling to machine code and it's ready
to run.
But in interpreter,
there will be interpreter.
It will transform the source code to byte code.
And then it will be executed by interpreter.
As you can see in the image,
this advantage is slower execution.
It takes much time compared to compiled language.
Okay, we have typing strategy.
Like dynamic,
strong,
static,
weak.
Dynamic code, we can see everything will be checked at runtime.
You don't need to declare each data type in the beginning.
Like in the Python.
There's no, you don't need to declare like integer
and equal to something.
In the strong,
strong type language will permit
the mixing types, like in the expression.
And they don't apply different implicit cast,
like C sharp.
For static,
you can, you should always declare the data type.
Like in the C++ or Java.
And there is also weak typing language
that implicit cast of types.
As a result, the output of some expression may be
surprising.
Like example of C++ or C language.
Okay,
here you can see the difference
between dynamic with static.
Here, as you can see,
define the function mean
and we passed the array.
We don't declare the array as a lease
or in the result we put in as a data type.
Python will know itself while interpreting it,
transforming source code to byte code will itself.
But in the static example of C,
we can see function double mean
because it will return the double.
And here you can see we put double and array.
And also we put the double before result.
We should,
in the static type,
you should declare before and our code,
it's data types.
Like double integer string,
float
or vector.
And also here you can see strong and weak.
In the strong,
we can see like,
we cannot add 42
to string.
Because this is a string,
but this is integer.
Before adding, you should convert integer to string.
Like here,
str
parenthesis
42 plus string.
Like here and then here you can add.
But in a weak,
like example of JavaScript,
it will add itself because it's a weak language
in short, I can say.
Let's move on.
Okay,
introduction to Python.
I hope you know the founder of Python,
Guido van Rosso.
He worked,
started working in the late December 1989.
And first version was released early
1990.
Yeah, and also language was needed Python.
And because the Guido van Rosso really liked
the comedy show of Monty Python's flying circus.
Okay, let's define the Python.
We already do know.
Purpose level of abstractions.
And we can say that Python is
general purpose,
higher level,
imperative,
interpreted,
strong in dynamic typing programming language.
Okay,
for general purpose, why it's general purpose,
because we can use Python for scripting,
for web development,
for data analysis,
for machine learning in AI,
develops in system administrations,
testers, automation,
and prototyping.
Okay, we already know why it's
high level and why it's interpreted because source code will be compiled using Python
VM to bytecode,
a Python compiler to bytecode,
and then Python VM to machine code,
and then
computer.
Oh, yes.
Yeah, it's object oriented.
In Python, everything is object,
even functions are object.
And dynamic.
Yeah,
it's dynamic.
You don't need to put
int
before x or string before y,
it will know itself
during the execution.
There are some advantages for Python,
like easy to learn.
It's easy like
you learn the English language,
you will learn Python programming language,
almost same.
And it's fast development,
a lot of libraries,
a lot of
standard libraries, a lot of frameworks,
Python,
Django, Flask,
fast API,
a lot of,
also it's dynamic typing,
you don't need to declare data types
in the source codes.
And also it's portable and extensible,
because there are
extents, oops,
there are extents for site and for C,
and Jiton for Jiten,
I don't know how to pronounce it,
for Java.net,
yeah.
And it's free and open source.
You can always go to
python.org and download the
version that
you want to work with.
Let's go ahead,
just go ahead.
Okay.
Yeah,
but there are some disadvantages like
speed,
because it's interpreted,
for sure, speed will be less.
And also,
normal to reading like in Java,
or high memory consumption,
because
you're not declaring the data types,
while coding,
it will,
it's dynamic,
because of this, it's
concept high memory.
Okay.
Let's move on.
Interactive Python.
Okay.
Okay,
here you can see some keywords
for Python, use it.
Yeah, did already start.
You can't use this as a variable in your projects.
Okay,
let's move on.
Next.
Python installation, Python installation,
Git installation,
Git lab.
Okay, I hope you know about Python, how to install Python,
you just go to
python.org and download the version that
you want, or just download the last version.
That's it.
For Python,
you can install the Python or you can install the
Python from jitprints, or you can install the VS code.
Also,
you'll see the code
as you wish.
Now, Git installation,
yep.
Just need to go to git
scm.com
and download.
Click on the download here,
choose your operating system windows,
macOS or Linux,
and just download it.
Okay.
Let's move on.
Git lab.
Yeah,
why they are saying Git lab?
Because here,
there is some,
I can show you practical task numbers.
There's some practical tasks that are
pushed to Git lab, not GitHub.
That's why they are
pushing to have a Git lab account.
But you can open Git lab as well, Git lab.com,
or
just
GitHub by typing git lab.com
and create an account.
It's really easy.
I hope you will
do it yours by yourself.
Let's move on.
Okay.
Done with this.
Done with this.
Okay.
Let's learn about the data types.
Data types,
like numbers,
conditional operators,
loops,
stringers, listers, topless,
sets and dictionaries.
Let's move on data types.
Okay.
Okay,
data types,
variables and objects.
This is a we
assigned to one.
And it says there integer data type is this is integer,
this is a string.
In Python,
everything is object.
And object is an
instance of some class.
Everything is an object.
Even classes are functions.
Okay.
Python standard data types,
have numeric data types,
like integer,
float or complex numbers.
And strings,
everything that is written inside it,
double quotes,
or also one quotes
is string.
And listers.
Listers,
we can say also like array.
And
for this,
list is a sequence of elements inside square brackets,
like here.
You can put
everything here.
It can be integer,
it can be float,
it can be
boolean,
or it can be also string.
Topless.
It's also like,
it looks like same to listers,
but it's in closer to parenthesis.
As you can see here.
And sets, sets us an unordered collection.
And it doesn't allow any kind of duplicates.
Dictionary.
It's a mapping of K value pairs
with K value pairs.
Yeah.
Like message,
high,
or
birthday,
some year,
name,
some name,
like K and value,
K and value,
like mapping.
Okay, we also have mutable and immutable objects.
Like for mutable,
it's objects that can change after their creation.
But in immutable,
you cannot change the type of
after its creation,
like integer,
float,
string,
or tuple.
Let's move on.
We have operators and operands.
Okay, first, what are the operators and operands?
It says like in simple terms and expression
two plus three,
the numbers two and three are operands.
And cyan is operator.
We have
unordered operators plus and minus binary operators,
less or more,
and in equal or in equal.
And turn your operator like else,
if,
For arithmetic operands,
we can
grow up like plus, minus,
multiplication,
division,
and et cetera.
And there is also assignment operands like plus and
equal sign,
minus or equal sign.
It will assign the right value to the left value.
I can show you the example.
Okay, let's assume we have
a zero,
a plus equals to one.
If we print a,
it will print a one here.
This is
same as
a equals to a plus one.
With minus is the same scenario.
But here will be minus and minus.
We have also,
we can put also the
multiplication or division.
Same here.
Division
or multiplication.
Okay,
we have comparison operators,
like equal sign,
not equal sign,
greater or less.
Logical operators and or are not.
And membership operators like in not in
and bitwise,
bitwise and bitwise are bitwise XR.
For comparison,
we can say one equals to two.
And we can print this.
It just says false.
We can put inequality.
It just says true.
Okay,
multiplication operator.
One and one.
It's true like if we put one and zero,
it will say
false.
Let's move on.
Okay,
let's talk about the numbers and Python.
And there are, yeah, there are three different types of numbers in Python integer,
float or complex.
This is an integer like we assign a
and we assign it to variable a hundred.
We assign also
minus
or such a huge number.
And if you have a
integer
that
in double quotes like string format, we can always
convert to integer like
just int parenthesis and X,
it will convert to integer.
And we can see the type type
Y.
And here integer is converted to integer.
Let's move on.
We have float like floating,
floating point numbers like
we have variable a and we assign
7893
.45.
We can also use scientific notation like 1.0 E and zero.
And here we can
always convert string to float,
float integer
integer to float
from one data type to another data type.
We have also complex numbers.
Yep.
Let's move on.
Okay, there is a simple calculations.
Let's not waste time for this.
We don't need this.
Let's
continue.
Let's move on.
Boolean comparison.
Boolean operates a law for defining the logical expression or can
be used by control flow statements.
But comparison operators provide different options for comparing the values,
which each other like
we can share compare like
result equals to three greater
than or equal to one and 10 less or
less than 20.
And this is true.
Why if
this is true,
and this is true,
result will be true.
If one of them is false,
the result will be false.
When we use end operator,
but if we use or operator,
if this is false,
and this is true,
result will be true also.
Because in or operator,
one of them should be true.
And it's enough.
And not operator,
it will just,
we can say
make true to false and false to true
like opposite.
We can see here
string,
string,
and we are taking a equals to b.
Result is true.
Okay, let's move on.
Okay, we have also conditions with flow control statements like a equals to 20,
b equals to 33 and minimum is three.
And we're here checking if a less or equal to minimum
and
b more or
equal to minimum result will be a plus b multiplication to two.
Else if this statement is incorrect,
this part of code will not be executed.
It will go here else and result will be zero.
And but in our case,
a is 20 and
it is more or equal to minimum three.
And b 33 is
more than or equal to three.
In this case,
result will be a plus b, it's 53,
multiplication by two, and it's
106.
We have also a leave or else if
statement where we can use a leave.
Actually,
we can also if we use here if it will check this
and this
also.
And then print out.
But an leave,
it will check this if this is true,
it will just print out.
If this is incorrect,
it will check this and print out.
But let's imagine this is not a leave,
but this is if,
it will check this, this is true,
but it will also check this
because we use it if here.
And then print out.
This is the main difference
between if and a leave.
Let's move on.
Nothing.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.