#1
Which of the following is a valid logical operator in programming?
&&
ExplanationLogical AND operator
#2
What is the result of 5 + 3 * 2?
13
ExplanationMultiplication has higher precedence than addition
#3
Which logical operator represents 'not equal to' in programming?
!=
ExplanationNot equal operator
#4
If x = 5 and y = 3, what is the result of !(x > y)?
true
ExplanationExpression evaluates to true because 5 is not greater than 3
#5
What is the purpose of using truth tables in logical reasoning?
To visualize the outcomes of logical operations
ExplanationTo represent possible truth values of logical expressions
#6
In propositional logic, what does 'p ∧ q' represent?
p AND q
ExplanationLogical AND operation between propositions p and q
#7
What is the negation of the statement 'If it is raining, then I will take an umbrella'?
It is not raining or I will not take an umbrella
ExplanationNegating a conditional statement results in a disjunction
#8
What does the XOR logical operator return if both inputs are true?
False
ExplanationReturns false as XOR requires exactly one input to be true
#9
Which logical fallacy is represented by the statement 'All dogs have tails. Fido has a tail. Therefore, Fido is a dog'?
Affirming the consequent
ExplanationInvalidly inferring the antecedent from the consequent
#10
What is the principle of explosion in logic?
The principle that allows any conclusion to be inferred from contradictory premises
ExplanationFrom contradiction, anything follows
#11
What is the Law of Excluded Middle in logic?
Every proposition is either true or false
ExplanationStates that no middle truth value exists
#12
In predicate logic, what does ∀x P(x) represent?
For all x, P(x) is true
ExplanationUniversal quantification of a predicate
#13
What is the Law of Identity in logic?
A proposition is true if it states that something is identical to itself
ExplanationA thing is identical to itself
#14
Which logical fallacy is represented by the statement 'If we ban handguns, we might as well ban all weapons. After all, a knife can be just as deadly'?
False analogy
ExplanationInvalid comparison between handgun and other weapons
#15
What is the Law of Non-Contradiction in logic?
No proposition can be both true and false at the same time in the same context
ExplanationA proposition cannot be both true and false simultaneously
#16
Which logical fallacy is represented by the statement 'Since the sun rose today, it will rise tomorrow'?
Post hoc ergo propter hoc
ExplanationAssuming causation based on temporal sequence
#17
What is the principle of bivalence in logic?
Every proposition is either true or false
ExplanationThere are only two truth values: true and false
#18
In predicate logic, what does ∃x P(x) represent?
There exists an x such that P(x) is true
ExplanationExistential quantification of a predicate
#19
What is the fallacy of composition?
Assuming that what is true of the parts is true of the whole
ExplanationIncorrectly applying properties of parts to the whole
#20
What is the fallacy of division?
Assuming that what is true of the whole is true of its parts
ExplanationIncorrectly applying properties of the whole to its parts
#21
What is the fallacy of equivocation?
Using a term in different senses within an argument
ExplanationMisleading by using a term ambiguously
#22
What is the fallacy of appeal to authority?
Appealing to an irrelevant authority
ExplanationArguing a claim is true because of an irrelevant authority
#23
What is the fallacy of appeal to ignorance?
Arguing that something is true because it cannot be proven false
ExplanationAsserting a claim is true because it hasn't been proven false
#24
What is the fallacy of appeal to emotion?
Using emotional manipulation to win an argument
ExplanationRelying on emotions rather than facts or logic