Hello and welcome.
In this video I will explain what the statements are in computer programming.
What is a statement compared to language a statement basically is a God of words.
Numbers are paratus that performs a specific task.
Now this group of words could also include things like comments comments are basically a way of explaining
in various parts of your computer code.
So a statement is a combination of words numbers operators and the various components that the programming
language needs to create a program.
So the first component of a statement can include vallieres values.
I like the data that the computer program needs to function.
For example a value could be a number it could be a text which in programming terms is referred to as
a string.
It can also be expression.
It could also be operators like a plus operator minus operator.
Those are known as operators could be a keyword like VAR.
Could be comments.
So these are various components that you can have in a statement.
When a computer program runs it looks at distastes meant in the code and it runs or executes from top
to bottom left to right one by one just to where you fully read the book from top to bottom.
Computer programming is executed or runs the computer programs from top to bottom and from left to right.
So usually the order is executed in the same order in which this statement is read written in computer
programming to run a program is to execute a program statement is just like a sentence in English language.
And just like in sentences you can have different components that make up the sentence.
A typical computer program will consist of multiple statements.
I have opened up a blank web page and the rest is called About column blank so if you type this in to
your web browser and just press enter it will give you a blank page.
So you were going to do is going to access the developer tool console so to do that.
If you just right click click on inspect and click on console and that will give you the console area.
So in this area here we can play around and experiment with some javascript code some won't to write
a very simple javascript statement.
So I'm going to say a quartz to
be times.
7.
This is a complete statement.
Even do a simple.
It's a complete statement.
Just like in the English language you can end your statement with a full stop in some programming languages.
They have different plantations depending on the language in javascript.
You typically end your statement with a say in my column.
This is a typical valid statement in javascript.
Let me quickly run through the statement with you that Characters A and B are called variables variables
are basically like simple boxes that you can use to store any of your stuff in computer programming
and you can use variables to store data.
Okay programs variables are used to hold values in value could be a number like 7 and the values are
things or data that the program will use.
So you can think of variables as a symbolic place holder for the values that they contain.
Now this number 7 here is basically is a value in itself and is called a literal value.
This is because it stands alone without being stored in a variable.
That equals to this as written here both characters are called operators.
They are used to perform actions with the values of variables such as an assignment and my mouth might
be called multiplication.
This equals tool is known as an assignment operator and this asterisk is no nothing more triplication
operator.
So basically what this is doing here is saying that he is a force to the value of b time.
7.
All right so once you get the value of your time to buy 7 story back in a.
That's basically what that statement is saying.
There are different types of operator.
This is just one that I have illustrated with.
Now most statement in group and or are concluded with a semicolon at the end.
This is specific to jamas group.
Other languages have different syntax requirement.
So this statement causes B time 7 basically tells the computer to get the current value that is stored
in the variable.
B.
Multiply that value by 7 then store the result back into the variable we call a.
That's what this statement is saying.
So programs are just a collection of many statements which together describe all the steps that it takes
to perform a computer program.
So you may have a busy program for example that adds numbers together so the various steps that you
have to specify for the computer to follow they are collectively referred to as statements.