Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

closed - book, closed - note, closed - person. 1. list all the comparis…

Question

closed - book, closed - note, closed - person.

  1. list all the comparison/relational operators. hint: there are more than 4.
  2. complete the following truth tables for the boolean logic operators:
xnot x
false
true
xyx and y
falsefalse
falsetrue
truefalse
truetrue
xyx or y
falsefalse
falsetrue
truefalse
truetrue

for question 3, assume:
a = 3.5
b = 10
10 is not 0

  1. evaluate the following expressions:

i) a > b or b!= 0 → true
ii) not (b < a) and a <= 3.5 → false
b 10 is not less than 3.5
continued on back...

Explanation:

Step1: List comparison/relational operators

The common comparison/relational operators are: == (equal to), != (not equal to), < (less than), > (greater than), <= (less than or equal to), >= (greater than or equal to).

Step2: Complete 'not' truth - table

The 'not' operator negates the boolean value. So when x = False, not x = True; when x = True, not x = False.

Step3: Complete 'and' truth - table

The 'and' operator returns True only when both operands are True. So:

  • False and False = False
  • False and True = False
  • True and False = False
  • True and True = True

Step4: Complete 'or' truth - table

The 'or' operator returns True if at least one of the operands is True. So:

  • False or False = False
  • False or True = True
  • True or False = True
  • True or True = True

Step5: Evaluate expressions

i)

Given a = 3.5 and b = 10, a > b is False and b != 0 is True. In an 'or' operation, if one of the operands is True, the result is True. So a > b or b != 0 is True.

ii)

b < a is False, so not (b < a) is True. And a <= 3.5 is True since a = 3.5. In an 'and' operation, both operands must be True for the result to be True. So not (b < a) and a <= 3.5 is True.

Answer:

  1. ==, !=, <, >, <=, >=

2.

xnot x
TrueFalse
xyx and y
FalseTrueFalse
TrueFalseFalse
TrueTrueTrue
xyx or y
FalseTrueTrue
TrueFalseTrue
TrueTrueTrue

3.
i) True
ii) True