Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This week we turn our attention to Comparison Operators. For the assignment this

ID: 3778803 • Letter: T

Question

This week we turn our attention to Comparison Operators. For the assignment this week, use Microsoft Word or Microsoft Excel to create your own Comparing Values table (see below). Be sure to include the basic Mathematical Comparison Operators as well as the other [ANY] Comparison Operators. Once completed submit your assignment via the assignment link for Week 5. Once you are completed with this assignment you will have a great resource to help you when you encounter Comparison Operators. Comparison Operators are very popular when designing and creating reports.

Comparing Values The following table lists the operators that compare values. Operator Description Equal or Not equal You should use because it is the American National Standards Institute (AN standard. Less than Greater than Less than or equal to Greater than or equal to Compares one value with any value in a list ANY Identical to the ANY operator SOME You should use ANY rather than soME because ANY is more widely used and, in my opinion, more readable Compares one value with all values in a list

Explanation / Answer

Different Comparison operators used:

This converts the operands into same type and then compares it. Eg.

1 == 1 à Gives true

1 == ‘1’ à Gives true

0 == null à false

This also converts the 2 operands into same type before comparison and returns true if both operands are not equal. Eg.

1 != ‘1’ à gives false

There is no type conversion and if the operands are strictly equal then only it returns true. Eg.

3 === 3 à gives true

3=== ‘3’ à gives false

There is no type conversion and if the operands are strictly unequal then only it returns true. Eg.

5 !== ‘5’ à gives true

Relational Operators

This returns true if the left operand is greater than the right operand. Eg.

4>3 à gives true

This returns true if the left operand is either equal to or greater than the right operand. Eg.

7>=7 à gives true

This returns true if the left operand is smaller than the right operand. Eg.

6<7 à gives true

This returns true if the left operand is either smaller or equal to the right operand. Eg.

7<=7 à gives true

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote