I'm sure you know that three plus two equals five, but did
you know that Tim plus space plus Buchalka equals Tim Buchalka.
Find out how that's possible in this video?
My name actually is Tim Buchalka and I'm from the Learn Programming Academy
and this is my Learn to Code Series.
So in addition to learning that Tim plus a space plus
Buchalka equals Tim Buchalka.
We're also going to talk about some more programming fundamentals
that are typically found in every programming language.
And that's because knowing about them will help you to
apply them in any programming language you may want to learn.
Combining variables, constant, arrays, and objects within a
program to do something like adding two numbers to produce a
result, introduces us to the next programming concepts of expressions,
operators and, operator precedence.
These three terms, they are mostly from arithmetic and mathematics,
but don’t let that freak you out.
I think you'll see that they're quite easy to understand.
And you might ultimately realize that you often use such concepts
in your everyday conversations.
Albeit not with specifically talking about math or arithmetic.
So there's two basic types of operators - arithmetic and assignment.
The arithmetic operators include add, subtract, multiply, and divide.
Using the plus symbol, the minus symbol, the asterisk symbol
and the forward slash symbol.
There are others depending on your programming language,
but we're going to limit these to just these four for now.
The assignment operator is the equal symbol.
It is generally used to communicate that a result will be computed
by completing the mathematical operation on the right-hand side of
the equal sign and place the result into a symbolic memory location on
the left side of the equal sign.
The mathematical operation is the expression and operator precedence
or order of operations determines the order in which parts of a
mathematical expression are evaluated.
A definition of expression in a programming language
is a combination of one or more constants, variables, arrays or objects
along with operators that the programming language interprets and computes
to produce another value.
All right, so that's a lot of definitions for you.
However, the basics of arithmetic and mathematics are in play here.
Working through an expression left to right, the rules of math
say to do multiply divide before any addition or subtraction.
Now I'm purposely not talking about the use of parentheses
in an expression to keep this as simple as possible.
So let's work through an arithmetic example.
I want to again, add two numbers like we did in the last video.
So add these together and obtain a result.
In arithmetic, it would look something like this.
17 plus 25 equals 42.
We could say 42 equals 17 plus 25.
In a programming language, the programmer would write a
statement like you can see on screen there, using the symbolic
names we've already mentioned.
So here it's result number equals first number plus second number.
And when this program executes, 17 would be stored in the memory
location named first number.
25 would be stored in the memory relocation named second number, and 42
would be stored in the memory location result number after the computer
performed the adding of the two numbers together to yield the result.
One final thought here, this discussion pertained to computations
working with numbers, but computers could also handle alphabetic and
character data manipulation as well.
Here's an example.
So let's say I have three symbolic memory location names called given
name, family name, and full name.
The data values stored in the given name, memory location is Tim.
The data varies stored in the family name is Buchalka.
Using the assignment expression here, full name equals given name
plus family name will result in the full name will result in the
full name memory location being assigned the value Tim Buchalka.
There's no white space between the given and family name.
In order to have a space between them, the programmer would need an
assignment expression like this one.
Full name equals given name plus two double quotes, plus family name
with a double quotes, have a white space character stored within it.
That's resulting in Tim space Buchalka being stored in the
full name memory location.
Oh my gosh, I hope your brain doesn't hurt from all of this.
Now much, much more could be said about these concepts, but let's
limit it to what we've covered and move on to the third and
final video covering programming language concepts coming up.
Did you know that there's three and only three basic building blocks that
exist in all programming languages?
Find out what they are in the next video.
Thanks for watching.
Alrighty, this is the part of the video we're meant to go in enthusiastic, and
to ask you, well quite literally beg you to subscribe to my channel
and to like the video, leave a comment and all that stuff.
Well, I'm going to leave that decision in your capable hands
to decide whether I've earned a like or subscribe or a comment.
I'd be grateful if you do one, both, or all three.
My videos will get out there in front of a bigger audience, if
I get that level of engagement, but obviously it's your choice.
All right, so remember that this series was meant
to be watched in order.
So if you haven't watched from the start, then how dare you watch
my video series out of order.
Click the link over here to get to the first video in the series
and watch that if you want to see the entire series in order.
Well, come over here and click to view the previous video in the series.
Again, your choice.
All right, I'm done, catch you in the next video.