So operators in Swift and in programming in general, well, the first operator we're going to discuss
is the assignment one this you've seen before, because if I type this statement, the equals symbol.
Is the assignment operator, I am assigning something to a variable in memory space.
Of course it's the same, even if I have a tuple.
I am assigning two things to that people, so X is nine and Y is zero.
In this case, a single equals sign is an assignment.
OK, the next lot of operators, we have our arithmetic now.
This is the category that everyone thinks of when you say the word operator.
So in that case, we'll have something like X plus Y, X minus Y.
You can see where this is going, X times Y.
Notice that that is an asterisk symbol.
It's not a multiplication symbol because X or Times is actually a letter.
So it's reserved for that use.
And then of course we have X divided by Y, which is a forward slash.
So all of these middle sections are the arithmetic opera operators.
We also have stuff such as nine percent four, which is the modulo I think is the word for it, and
this gives us the remainder.
So nine divided by for the remainder of that should be one.
Now, nothing's working, right, if you encounter this in your playground, you will look look at that
horrible error.
Then what you have to do is probably quit your playground.
And then restart everything.
Oh, there we go.
I think that's.
Oh, that's weird, I'm going to restart.
See you in a sec.
So I restarted and I saw what the error was.
X divided by Y is nine, divided by zero, which is infinity.
So what I'm going to do is just do the following.
Put a one there.
Now, we should be all right.
There we go.
It's what we call in programming a picnic problem in chair, not in computer.
OK, so now back to the modulo operator and this gives us a remainder of one because nine divided by
four is to remainder one.
OK, and that is actually very handy.
You'll see what that's like.
You'll use that quite a lot in your programming life.
In fact, in this course, we've already used it a fair amount.
Now, the other thing we have is let's say we have two words and we want to smash them together.
This is called the concatenation operator or concat for short.
This is common to pretty much every language out there.
There are shortcuts to miss out this concat operator and swift, which are slightly easier to type.
But I tend to use these anyway because I'm old school like that.
So that's the concatenation operator.
Now your homework.
Let's get this out here.
Create any two numbers, multiplied them and give the result as a sentence with words.
So I want you to use pretty much all these operators here and then the concatenation operator to do
that.
Good luck.