0% found this document useful (0 votes)
21 views5 pages

PYTHON100-MOD2-CODING BACKGROUND-V2-en

Py1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views5 pages

PYTHON100-MOD2-CODING BACKGROUND-V2-en

Py1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

(upbeat music)

- Welcome back to Python Fundamentals.


This is module 2.
In this module, I'm gonna go over some of the terms
and background environment
before we actually jump into coding
so that you have a level set ground of understanding
of the environment and the technical terms.
Then the next module, we'll actually install the environment
and write our first Python code.
So this is the coding background.
So I'm gonna go over in this module, what is all this stuff?
So there's a lot of terms
that maybe you are not familiar with,
such as Python, Anaconda, Jupyter Lab.
So let's go through those
so that we understand the environment
we're going to be using for this course.
So what is coding or code anyway?
So code very simply are the instructions
that are executed by the computer.
And coding or programming is writing the instructions
for the computer.
Program is all of the lines of code together.
So you will be writing the code.
So you will be writing instructions
for the computer to execute.
So if you write something in error,
the computer's gonna go and execute it anyway.
So you're kind of in control here
about telling the computer what to do.
Computers can do things very fast that humans can't,
like complex math can be done very, very quickly,
but computers don't necessarily
detect the logical errors that might be in your code.
So again, the code are your instructions to the computer,
telling the computer what to do.
Now, code is written in a programming language.
The programming language for this class,
of course, is Python,
but there's lots of programming languages out there.
What is a programming language?
Just like we have symbols and words and rules in English,
so I'm delivering this course in English,
using that language,
a programming language has the same thing.
So Python specifies, the Python programming language
specifies the words and symbols that are used in the code,
as well as a set of rules
that dictate how the words and symbols are put together.
How the words and symbols are put together
is known as syntax.
And what's really good when you write Python code
in a code editor is a lot of times,
the editor that we're writing in will tell you
when you make a syntax error.
The same way Microsoft Word might tell you
that there's an error in your grammar
or an error in your spelling,
a lot of times we'll get extra help from software saying,
"Hey, that python's not exactly right."
So many programming languages exist.
Python is an extremely popular right now
programming language, but there's a lot out there.
And good for you
is that once you learn your first programming language,
it's pretty easy to transfer the concepts and knowledge
to the next programming language, okay?
So where do we actually write this code, right?
So once I'm getting in and teaching you
the syntax of Python, the rules and the symbols
and how everything goes together,
where do you actually write it?
Well, theoretically, any editor would work, right?
You could actually write Python in PowerPoint
or a Microsoft Word or a Notepad.
I mean, any place that you can write text,
you can write Python.
The code you write is typically known as source code, okay?
So that's the source code,
that's the Python code you are writing.
Now, of course, most programmers don't use Microsoft Word
to write their code.
Most programmers use what's called
an Integrated Development Environment, an IDE for short.
That's where we're going to write the code,
where we're going to execute the code,
and there's gonna be a lot of helpful hints
for errors that we can access through the IDE.
In this course, we're going to use an IDE
that's accessed through Anaconda,
and we're gonna use Jupyter Labs and Jupyter Notebooks.
That's what we're gonna use for this course.
So let's talk about where we're gonna put our code
and then how those tools are used.
So once you're writing your code inside those tools,
you have to think about where you're going to save it,
just like you would save any other file on your computer,
if you're making a Word document or a PowerPoint slides
or anything, in Excel sheet, you wanna save it somewhere.
So my suggestion is to make a folder
in a place that's easy to remember where it is
and gets backed up periodically.
I don't store anything important on my hard drive.
I use a locally mounted network drive
because that gets backed up by my employer.
So you guys decide where you want to save your code,
make a folder for that,
and then we'll put all of our Jupyter Notebooks
containing our Python code in there.
Generally, don't, it's gonna be more difficult
if you make a folder name with spaces in it.
So in general, for computer programming,
and you'll see that when we get into Python,
you should never call anything with spaces, right?
So don't use spaces in the name of the folder.
So if you wanna pause the video right now
and figure out where you're gonna gonna store your code
or you can wait until the next module,
but you'll have to have a folder set up
for where you can store your code.
So what is it with all these snakes, right?
So we have Python and we have Anaconda
and then we have Jupyter, which is spelled a little weird,
not like the planet Jupiter.
So let's go over what all of these mean
and how they came to be, what's happening with these.
So the first one of course is what is Python?
So Python is, as I've said several times,
a programming language.
It was developed by Guido van Rossum.
That's a Dutch programmer.
He was employed by the National Research Institute
for Mathematics and Computer Science in Amsterdam,
and he developed Python.
So of course, that's his picture there.
It was released to the world in 1991
and there's been many versions of Python since 1991.
Why is it named Python?
And you can see the icon over there on the right,
the two snakes, one upside down,
but Python was really,
urban legend has it that van Rossum
was reading "Monty Python's Flying Circus,"
which is a comedy series from the 1970s
when he was developing this
and he wanted something memorable and catchy,
and he decided to name the programming language
he was developing, Python.
So that's where the name Python came from.
So why Python?
Why should you learn Python?
Why is it applicable in the area of data analytics?
So lots of good reasons.
I put a couple on this slide.
Python's open source, meaning that it's not proprietary.
It's not like one company owns it
and will charge you for it and kind of shepherds it.
Open source means it's developed
and cared for by a community,
freely available and widely available
to anybody who wants it.
You may not agree,
but I actually think it is easier to read and learn
than some of the other programming languages out there.
And you can make that assessment for yourself
as you go through the course.
There's a ton of libraries freely available.
So what is a library in the sense of coding?
A library really just is code that somebody else wrote.
And there are so many libraries available in Python
that you can import and use,
so you don't have to write it yourself.
So again, this is reuse of other people's code
which makes it easier for you to do your job
and not focus on something else
that somebody else figured out already
and has a library for.
And we are gonna be, throughout this course,
importing libraries and using libraries from other people.
Python's very popular for building
both small, simple scripts.
And when people say scripts,
they really mean like little programs, tiny little programs.
Python's also capable of developing really complex apps,
so it's scalable.
So those two points mean that it can be used
for small, quick, easy tasks,
or we can build it into something big and complex.
As you know, because you're taking this course
in preparation for doing more in data analytics,
Python's become very popular in artificial intelligence
due to the analytics functions and libraries.
So there's a lot of AI, a lot of machine learning,
natural language processing, a lot of AI tasks
where there are built Python libraries to do things.
So it's very popular in the area of AI.
It's also very popular in analytical finance.
So a lot of the AI work and data analytics work
that's done in finance is mainly done in Python.
All of this culminates in the last point on here
that there is an extensive job market
for Python programmers.
So that's one of the reasons that Python is often learned
in preparation for data analytics work.
Okay, so what is Anaconda, another snake name. (laughs)
So Anaconda is something that we're gonna install
in the next module.
It's a way to get Python.
So I just went over what is Python programming language.
So you might be saying to yourself,
"Well, how the heck do I use it? How do I get it?"
So we are going to get Python
by downloading the Anaconda Distribution, okay?
So Anaconda Incorporated has packaged together
a whole bunch of really useful tools and languages together
in a free download for us,
includes many tools and libraries,
and it's gonna help us manage our Python code.
Included in Anaconda is something called Jupyter Lab,
which we are going to use to write our code
and manage all of our code files.
And we'll see Jupyter Lab in action in the next module.
So what are Jupyter Notebooks and Jupyter Lab?
So, Jupyter Lab is a web-based
interactive development environment for our code.
What does that mean?
It means that when we bring up Jupyter Lab,
it's actually gonna come up in your browser.
So it's gonna be a browser tab for you,
and it's going to be a pretty easy interface,
allowing us to organize and open up and work on
and execute our Python code.
Our Python code is going to be developed in documents.
So you're familiar with documents, right?
Like Word documents or Excel documents.
So we're gonna create Jupyter Notebook documents.
And they're going to contain code,
as well as rich text elements that help explain the code.
Jupyter Notebooks.
Where does the name Jupyter come from?
It comes from the three core programming languages
that are supported by Jupyter.
That would be Julia, Python, and R.
In this course,
we're only going to, of course, learn Python,
but when you install Anaconda,
you can use it for R or Julia if you'd like.
The name and logo are an homage
to Galileo's discovery of the moons of Jupiter.
So you can see the Jupyter logo over there on the slide.
So we're gonna create Jupyter Notebooks in Jupyter Lab,
and the way we're gonna get Jupyter Lab
is by installing Anaconda.
So that's the end of this module.
So hopefully, you have a good understanding
of all of those terms, Python, Jupyter Lab,
Jupyter Notebook, Anaconda.
It might be a little mysterious at this point,
but when we install them,
I think it'll become more evident how they all fit together.
The other thing I did in the beginning of this module
was just a quick overview of what is computer code.
So let's move on now to module 3
where we'll actually get the software up and running.
(upbeat music)

You might also like