## Which one of the following propositional logic formulas is TRUE when exactly two of p, q, and r are TRUE?

Option A. ((p ↔q) ∧ r) ∨(p ∧ q ∧∼ r)

Option B. (∼(p ↔ q) ∧r) ∨ (p ∧q ∧ ∼r)

Option C. ((p →q) ∧ r) ∨(p ∧ q ∧∼ r)

Option D. both a and b

True Answer B

##### Explanation :

propositional logic formulas is TRUE when exactly two of p,q and r are TRUE means possibilities are pq or qr or pr to be TRUE

option A)

((p↔q)∧r)∨(p∧q∧∼r)

=((T↔T)∧r)∨(T∧T∧∼r) ( take p=T and q=T)

=((T)∧r)∨(T∧∼r)

=(r)∨(∼r)

=T

It doesn't depend upon the value of r, so, if the value of r is T then it also to be T so the condition exactly 2 are T is false. Hence option A is FALSE.

option B)

(∼(p↔q)∧r)∨(p∧q∧∼r)

=(∼(T↔T)∧r)∨(T∧T∧∼r) ( take p=T and q=T)

=(∼(T)∧r)∨(T∧∼r)

=(F∧r)∨(T∧∼r)

=(F)∨(∼r)

=∼r

so if r=F then this is T so condition exactly 2 are T is true

(∼(p↔q)∧r)∨(p∧q∧∼r)

=(∼(T↔q)∧T)∨(T∧q∧∼T) ( take p=T and r=T)

=(∼(q)∧T)∨(F)

=∼(q)∨(F)

=∼q

so if q=F then this is T so condition exactly 2 are T is true

(∼(p↔q)∧r)∨(p∧q∧∼r)

=(∼(p↔T)∧T)∨(p∧T∧∼T) ( take q=T and r=T)

=(∼(p)∧T)∨(F)

=∼(p)∨(F)

=∼p

so if p=F then this is T so condition exactly 2 are T is true

Hence option B is CORRECT.

option C)

((p→q)∧r)∨(p∧q∧∼r)

=((T→T)∧r)∨(T∧T∧∼r) ( take p=T and q=T)

=((T)∧r)∨(T∧∼r)

=(r)∨(∼r)

=T

It doesnt depend upon value of r , so , if value of r is T then it also to be T so the condition exactly 2 are T is false . Hence option C is FALSE.

option D)

(∼(p↔q)∧r)∧(p∧q∧∼r)

=(∼(T↔T)∧r)∧(T∧T∧∼r) ( take q=T and r=T)

=(∼(T)∧r)∧(T∧∼r)

=(F∧r)∧(T∧∼r)

=F∧(∼r)

=F

It doesnt depend upon value of r , so , if value of r is F then it also to be F so the condition exactly 2 are T is false . Hence option D is FALSE.

### Which one of the following propositional logic formulas is TRUE when exactly two of p, q, and r are TRUE?

## He turned a deaf ear to my request. What does the underlined phrasal verb mean?

Option A. ignored

Option B. appreciated

Option C. twisted

Option D. returned

True Answer A

##### Explanation :

‘turned a deaf ear’ means ignored

### He turned a deaf ear to my request. What does the underlined phrasal verb mean?

What will be the output of the following Python code?

print("xyyzxyzxzxyy".count('yy'))

Option A. 2

Option B. 0

Option C. error

Option D. none of the mentioned

True Answer A

##### Explanation :

Counts the number of times the substring ‘yy’ is present in the given string.

What will be the output of the following Python code?

print("xyyzxyzxzxyy".count('yy'))