Hi, everyone.
If you're new to Python, you might have the desire to learn the basics of Python as fast as possible.
Python is one of the most valuable languages to know, and this is because he has wide use is an open
source programming language that is used for game development, graphical user interface applications,
education and many more.
So having the skill to write code in Python will boost your career in this?
Exactly what we are going to do in this video in the next one hour, I will simply teach you how to
declare variables in Python, how to write control statements, if statements and large corporations
to the video, you'll be able even to complete the exercises on your own and take the results.
Of course, I'll provide solutions for this exercise.
So don't you worry.
And this is it.
For the next one hour, take a cup of coffee or tea and let's go together for the next one hour.
So here we are in the cliffside and the first thing we need to do to start a project is to select a
new project and then here simply select Python project, then proceed next.
And let's name our project as the intro.
To.
Bite them, and that's it.
So now here you already created the project, and the first thing I will do in sight is to simply create
a Python class or python package first.
So the Python package will be called.
Python intro, and now inside this package, you can finally create your first Python file, so let's
select Python Dev module.
InterOil select OK here and that to the guys, so you see something like this here in Eclipse and now
we can start typing some functions and statements with Python and here we will run our code and simply
get the results.
Now, obviously, the first thing we want to do is simply to print Hello World.
And with Python, actually this is quite easy.
So let's right here print and in the brackets.
Simple, right?
Hello.
World.
That's it, and now we can run our program here.
Run hospital and then you get Hello, world.
So this was the first step of writing Python code, so since now you know how to print stuff.
Let's actually have a look at what variables we can declare in Python and basically how we declare variables
in this programming language before doing that.
You must know that Python doesn't separate each language semicolon.
Instead, it is called indentation level language.
And this means that here will take care of the spacing between the different lines of code in order
for our program to know what operation to do first and what to do next.
So saying this, we can write some variables here and let's write the date.
So let's write here variables and let's write date equals.
Twenty one.
By no equals three point one four.
Then let's write a string email.
Equals.
Will Smith.
Yahoo!
Dot com.
OK, and then let section write the boolean variable it equals.
True, and that's it.
These are actually four variables for different types of variables that you can write in Python.
So the first one is an integer date in here.
You can see that we don't need to specify that this variable is integer.
Python automatically specifies that.
Then we have the final word usually afloat.
But here we are also looking to specify.
Then we have an email which is a string and finally we have a boolean.
So let's print each of this and see what's going to happen.
So let's print the first date so you can print the dates like this print.
And then the variable name is to refer directly to the value of date, which is twenty one.
Then let's run.
And here we getting twenty one.
Then let's pour into the pie no.
And you can see that by three point one four, then we can print the email and you can see that our
email was Will Smith at Yahoo!
Dot com.
So it is quite simple, actually.
OK, finally, I will print the volume, eat so to Rosewell so it doesn't matter what is the type of
the variable, by doing the print statement, we can simply print it on our screens.
So that's it.
This is how we declare variables in Python.