In this section, you will learn about the different kinds of data you can work with in your Python
programs.
You will also learn how to use variables to represent data in your programs.
So here we will.
Write a simple code here, which is Hello world.
Print.
Hello, Oxley World.
And here, let's take a closer look at what Python does when you run this script.
As it turns out, Python does a fair amount of work even within the runs a simple program.
So when you run this code, you should see this output.
So when you run the our main.py file, the ending page here indicates that the file is a python program
and your editor runs the file through the python interpreter which reads through the program and determines
that what each word in the program means.
For example, when the interpreter sees the word print here, when the interpreter sees the word print,
followed by parentheses here.
It prints to the screen whatever is inside the parentheses here.
As you write your programs, your editor highlights different parts of your program in different ways.
For example, it recognizes the print is the name of a function like this here and displays the word
in one color.
It recognizes that Hello world is not a python code here.
And this place that fairs in different color.
As you can see, it's green, it's purple here.
So the feature is called syntax highlighting, and it's quite useful as you start to write your own
programs.
So let's get started with variables.
So let's try using a variable in our main file and let's add a new line here.
So we will message and here.
Hello world.
Here.
And after that we will use print again.
Print?
Maybe if I raise them.
Font size a little bit.
So you can see better here.
25.
Okay, Nice.
So now we're going to use print message.
So now let's run this program again and see what's happening here.
As you can see here, Hello world again.
So we have added a variable name.
And name the message, and every variable is connected to a value.
Which is the information associated with that variable.
In this case, the value is Hello World.
This is the text.
And adding a variable makes it a little more work for Python interpreter and when it processes the first
line, it associates the variable message with the Hello World text.
And when it reaches the second line, it prints the value associated with the message to the screen.
Now let's expand on this program by modifying this file to print a second message.
Here we will add a blank line to here and then we will add two new lines to the code.
Now, message and here, Oxley.
Python.
Training.
And or course.
Right.
And here after that, we will also print this message.
So remember, these are the same variable names here.
So now when you run this code, you will see this message.
But you can change the value of variable in your program at any time, and Python will always keep track
of its current value.