-
PROFESSOR: Let's learn
another important key term.
-
Well, two for that matter.
-
One is expressions and the
other one is statements.
-
You're going to hear this a lot
when talking to programmers.
-
So what do they mean?
-
Let's have a look.
-
If we create a piece of code
here, let's just say IQ is 100,
-
IQ has lowered.
-
And then let's say user age is
going to equal IQ divided by 5.
-
An expression is this
part of the code.
-
It's a piece of code
that produces a value.
-
In our case, this
produces a value.
-
Because 100 divided by
5 is going to equal 20.
-
So this is an expression.
-
A statement, on
the other hand, is
-
an entire line of code,
not this entire thing,
-
but an entire line of code that
performs some sort of action.
-
In this case, what
action are we performing?
-
Well, the action is that we're
calculating 100 divided by 5
-
and then assigning that value
to the variable-- user age.
-
So this is an expression.
-
This is a statement.
-
And also this is
another statement.
-
So if you hear me
mentioning these terms
-
throughout the course,
hopefully, now you
-
know what they mean.
-
I'll see you in the next one.
-
Bye-bye.
-