Hello and welcome to the golems programming language course in the Pentagon session, we talked about
assignment operators and indecision.
We want to talk about the other operators concept.
Competition operators, competition operators or relational operators are used to compare to values,
competition operators in go language are equal to not equal to less than less than equal to greater
than and greater than equal to.
Now let's go to this school program to illustrate how to use competition operators.
First, we define two variables and initialize them.
For example, a in equals 50 and B calling equals 40.
At first, we want to create a sandpit for equal to operate.
So the right result?
One column equals a equal to B.
Equal tour operator checks whether the two given Australians are equal or not.
If so, it returns true.
Otherwise, it returns form for the exam period if the values of A and B are equal to each other.
The value of true will be stored in the resolved one variable.
Otherwise, the value of funds will be assigned to it now displayed the value of resolved one variable.
So right FP.
A e eku to be column comma resolved one, reformat the code, save the project and execute the program.
Now we can see the outputs result.
One value is equivalent false because the values of these two variables are not equal to each other
and a equal to BS.
False.
Now create a sample for not equal to a creator of first clear last code and define a variable not resolved
two column equals.
A not equal to be, not equal to operate or checks, whether the two given often are equal or not.
If not, it returns true.
Now go to the next line and display the result of variable to FP.
A not E!
Cool B column.
And is it resolved to reformat the code, save the project and execute it through, you know?
Now we can see the output result, one value is equivalent to because the values of these two variables
are not equal to each other, a not equal to be at, it returns true.
Now create a sample for less than operator.
So first clear the last quote define a variable like off three column equals a less than be less than
operator checks, whether the first or print is less or the second or print.
If so, it returns to.
Otherwise, it returns false.
So go to the next line and display the value of results.
Three.
Value the FP a less than be column and we said result three.
The format they call save the project and execute the program.
Now we can see the output result.
Three values equivalent false because the value of a variable is not less than be variable and it returns
false.
Now create a sample for less than equal do operator.
So first the last quote.
Define a variable result for column equals a less than equal to be less than equal to operate or checks,
whether the first or present is lesser than or equal to the second.
If so, it returns true.
Otherwise it returns false.
So go to the next line and display the reason for value FP a less than equal to be in.
And we said reason for reform at the core, say the project and execute the program again.
Now we can see the output result for value is equivalent false because the value of a variable is not
lesser than or equal to be variable and its returns false.
Now we want to create a sample for greater than operator.
So first, clear the last code.
So define a variable like these five column equals a greater than B.
Greater than operator checks, whether the first or print is greater than the second or print.
If so, it returns true.
Otherwise, it returns false.
Now go to the next line and display the result.
Five Variable value so of right Duffy a greater Din B column, he said.
Resolved five.
Reformat the call.
Save the perfect time to execute the program.
Now we can see the output result five value is equivalent to because the value of a variable is greater
than to be variable, and it returns true.
Now you want to create an example for greater than equal to or greater.
So first clear the last quote define a variable like resolved six column equals a greater than equal
to be.
Greeter Danny Cool two operator checks whether the first or grant is greater than or equal to the second
option.
If so, it returns true.
Otherwise it retains fast.
So go to the next line and display the results.
Six Variable value So be right FP a greater than equal to be call in and we said result six value reform
of the code.
Save the project and execute the program.
Now we can see the output risen six value is equivalent to because the value of a variable is greater
than equal to be variable and is returns true.
OK.
We were able to explain the definition of conversion operators and give examples in order not to prolong
the time of decision.
We will finish it and we will continue the content in the next session.
Goodbye.