Week 4 GA Solutions 2a
Week 4 GA Solutions 2a
Question 1 [4 Marks]
Statement
For which of the following situations is a nested loop needed? Assume that no procedure is used. It is a Multiple Select
Question (MSQ).
Options
(a)
To find the number of authors who have written a book in "French" in 2007 from the "Library" dataset.
(b)
To find the number of pair of students who have scored the same Physics marks from the "Scores" dataset
(c)
To find the number of players who have won the medal in "Wrestling" from the "Sports" dataset
(d)
To find the number of students with at least two vowels in their name from the "Scores" dataset.
Question 2 [4 Marks]
Statement
The following pseudocode is executed using the “Scores” dataset. Assume that length(x) is a procedure that returns the
number of letters present in a word x. What will A represent at the end of the execution?
A = 0
while(Table 1 has more rows){
Read the first row X in Table 1
i = 1, B = True
C = X.Name
while(i <= length(C)){
if(ith letter of C is a
vowel){ B = False
}
i = i + 1
}
if(B){
A = A + 1
}
Move X to Table 2
}
Options
(a)
Number of students whose names are without vowels
(b)
Number of students whose names have at most one vowel
(c)
Number of students whose names have exactly one vowel
(d)
Number of students whose names have at least one vowel
Question 3 [4 Marks]
Statement
The following pseudocode is executed using the “Library” dataset. What will C represent at the end of the execution?
Assume that there is only one row corresponding to each author in the "Library" dataset.
C = 0
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
while(Table 1 has more rows){
Read the first row Y in Table 1
if(findpair(X, Y)){
C = C + 1
}
Move Y to Table 3
}
Move all rows from Table 3 to Table 1
}
Procedure findPair(X, Y)
if(X.Genre == Y.Genre and X.Language !=
Y.Language){ return(True)
}
else{
return(False)
}
End findPair
Options
(a)
Number of authors who have written different genre books in same language
(b)
Number of pairs of authors who have written different genre books in same language
(c)
Number of authors who have written same genre books in different language
(d)
Number of pairs of authors who have written same genre books in different language
Question 4 [5 Marks]
Statement
Two words are said to be special if they fulfill following conditions:
The given pseudocode is executed using the “Words” dataset. The variable count in the given pseudocode counts the
number of special pairs. Choose the correct code fragment(s) to complete the pseudocode.
Options
(a)
if(X.LetterCount == Y.LetterCount){
if(vCount(X) == vCount(Y)){
count = count + 1
}
}
(b)
if(X.LetterCount != Y.LetterCount){
if(vCount(X) == vCount(Y)){
count = count + 1
}
}
(c)
if(X.LetterCount == Y.LetterCount){
if(vCount(X) != vCount(Y)){
count = count + 1
}
}
(d)
if(X.LetterCount != Y.LetterCount){
if(vCount(X) != vCount(Y)){
count = count + 1
}
}
Question (5−6)
Statement
The following pseudocode is executed using the “Scores” dataset. The variables M, P and C store the number of
students in Mathematics, Physics and Chemistry clubs respectively.
Questions 5 [5 marks]
Statement
Which club can a student join if he/she gets 91 marks in all three subjects?
Options
(a)
Physics
(b)
Chemistry
(c)
Mathematics
(d)
The student cannot join any club
Question 6 [4 Marks]
Statement
Can a student join more than one club ?
Options
(a)
Yes, if the student has scored more than 90 marks in at least two subject
(b)
Yes, if the student has scored more than 90 marks in Mathematics and Chemistry
(c)
Yes, if the student has secured more than 90 marks and the same marks in Mathematics and Chemistry
(d)
Statement
The given pseudocode is executed using the “Shopping Bills” dataset. frac stores the ratio of the number of customers
who purchased both “Soap” and “Facewash” to the number of customers who purchased “Facewash”. Choose the
correct code fragment to complete the pseudocode. (Assume there is at least one customer who has purchased
“Facewash”).
mCount = 0, bCount = 0
while(Pile 1 has more
cards){
Read the top card X in Pile 1
*********************
* Fill the code *
*********************
Move X to Pile 2.
}
frac = bCount / mCount
Options
(a)
if(isItem(X, “Facewash”)){
mCount = mCount + 1
}
if(isItem(X, “Soap”)){
bCount = bCount + 1
}
(b)
if(isItem(X, “Soap”)){
bCount = bCount + 1
if(isItem(X, “Facewash”)){
mCount = mCount + 1
}
}
(c)
if(isItem(X, “Facewash”) and isItem(X,
“Soap”)){ mCount = mCount + 1
bCount = bCount + 1
}
(d)
if(isItem(X, “Facewash”)){
mCount = mCount + 1
if(isItem(X, “Soap”)){
bCount = bCount + 1
}
}
Question 8 [4 Marks]
Statement
The following pseudocode is executed using the “Olympics” dataset. At the end of the execution, A, B and C store the
number of pairs of players from the same nation who have won same medal in different year. Assume that one player
has won only one medal. Choose the correct code fragment(s) to complete the pseudocode. It is a Multiple Select
Questions(MSQ)
Options
(a)
if(Y.Nationality ==
Z.Nationality){ if(Y.Year !=
Z.Year){
D = D + 1
}
}
(b)
if(Y.Year != Z.Year){
if(Y.Nationality ==
Z.Nationality){ D = D + 1
}
}
(c)
if(Y.Year != Z.Year and Y.Nationality ==
Z.Nationality) D = D + 1
}
(d)
if(Y.Year != Z.Year or Y.Nationality ==
Z.Nationality) D = D + 1
Qu}estion (9−10)
Statement
The following pseudocode is executed using the “Words” dataset.
A = 0, B = 0
P = True, Q = False
while(Table 1 has more
rows){
Read the first row X in Table 1
if(X.PartOfSpeech == "Adjective" and P){
P = False
Q = True
}
if(X.PartOfSpeech == "Noun" and Q){
B = B + 1
}
else{
if(not Q){
A = A + 1
}
}
if(X.Word ends with a full stop){
P = True
Q = False
}
Move X to Table 2
Question 9 [4 Marks]
Statement
What will A represent at the end of execution?
Options
(a)
Number of words after the first noun in every sentence which are not adjectives
(b)
Number of words which appear before the first adjective in every sentence
(c)
Number of words other than nouns which appear before the first adjective in every sentence
(d)
Number of words after the first adjectives in every sentence which are not nouns
Question 10 [4 Marks]
Statement
What will B represent at the end of execution?
Options
(a)
Number of nouns after the second adjective in every sentence
(b)
Number of nouns before the second adjective in every sentence
(c)
Number of nouns before the first adjective in every sentence
(d)
• For NAT type question, enter only one right answer even if you get multiple answers
for that particular question.
• Notations:
1
1. A function f ( x ) which is the best fit for the data given in the Table−1 recorded by a
student, is
y = f ( x ) = − ( x − 1)2 ( x − 3) ( x − 5) ( x − 7) + c
What will be the value of c, so that SSE (Sum Squared Error) will be minimum?
(NAT)(Ans: 4) [Marks:2]
x 1 2 3 4 5
y 4 19 4 −23 4
Table−1
2
2. Let f : R → R and g : R → R be two functions, defined as f ( x ) = x3 − 6x2 + 9x − 4 and
g(x) = − 2 f ( x ) respectively. Choose the correct option(s) from the following
(MSQ) [Marks: 2]
Set of correct options:
3
.
4
3. An ant named B , wants to climb an uneven cliff and reach its anthill (i.e., home of
ant). On its way home, B makes sure that it collects some food. A group of ants
have reached the food locations which are at x−intercepts of the function f ( x ) =
( x − 5) ( x − 1)2 − 1 . As ants secrete pheromones (a form of signals which other ants
can detect and reach the food location), B gets to know the food location. How many such
food locations are there?
(NAT)(Answer: 3) [Marks: 1]
5
4. Which among the following function first increases and then decreases in all the intervals
(−6, −4 ) and (−3, 1) and (1, 2).
(MSQ)(Answer option (c), (d)) [Marks: 2]
• 1
10000
( x − 1)2 ( x − 2) ( x + 3)3 ( x + 4) ( x + 6)2 ( x + 7) ( x + 8)
• 1
10000
( x − 1)2 ( x − 2) ( x + 3)3 ( x + 4) ( x + 6)3 ( x + 9)
10000 ( x − 1) ( x − 2) ( x + 3) ( x + 4) ( x − 5) ( x + 6)
1
• 2 3 2
• 1
100000
( x − 1)2 ( x − 2) ( x + 3)3 ( x + 4) ( x − 5) ( x + 6)2 ( x + 11)
6
.
7
5. The Ministry of Road Transport and Highways wants to connect three aspirational
districts with two roads r1 and r2. Two roads are connected if they intersect. The
shape of the two roads r1 and r2 follows polynomial curve f ( x ) = ( x − 5)2 ( x − 7)2
and g(x) = − ( x − 5) ( x − 7) respectively. What will be the x−coordinate of the third
aspirational district, if the first two are at x−intercepts of f ( x ) and g(x).
(NAT)(Answer: 6) [Marks: 3]
8
6. Choose the correct options from the following
(MSQ) (Ans. Option (a), (b), (c), (d)), (3 marks)
⃝ There are infinitely many polynomial p(x) of degree three such that p(4) = 0,
p(5) = 0, p(6) = 0.
⃝ The number of turning points of f ( x ) = 0.01 (2 − x ) ( x − 8) ( x − 12) (16 − x)2
is 4.
⃝ The remainder when f ( x ) = 0.01 (2 − x ) ( x − 8) ( x − 12) (16 − x) 2 is divided
by ( x − 16)2 is 0
⃝ The function g(x) = −0.01 (2 − x ) ( x − 8) ( x − 12) (16 − x ) is positive in re−
stricted domain (2, 8) ∪ (12, 16).
9
.
10
7. Consider a polynomial function p(x) = 1100( x − 1) (2 − x ) (3 − x) 2 ( x − 4) x (1 + x ) ( x + 2)2.
Choose the correct options from the following
(MSQ)(Answer: option (a)(b)) [Marks: 2]
• There are exactly 8 points on p(x) where the slope of the tangent is 0.
• p(x) is one−one function when x ∈ ( −∞ , −2 ) ∪ (4, ∞)
• Total number of turning points of p(x) are 9.
• p(x) is strictly increasing when x ∈ ( −∞ , −2)
11
8. Let f ( x ) and g(x) be two functions defined from R to R such that
g(x) = |x|
ƒ (0)
Find the value of f (4)g(−4) + g (−64) + f (3) − g(40).
(NAT)(Ans: 0) [Marks: 1]
12
9. Let r ( x ) be a polynomial function which is obtained as the quotient after dividing the
polynomial p(x) = ( x + 5) ( x − 3) (x 2 − 4) by the polynomial q(x) = ( x − 2) ( −2 − x).
Choose the correct option which represents the polynomial r ( x ) most appropriately.
(MSQ)(Ans: Option 3) [Marks:2]
y y
r(x)
r(x)
(−•5, 0) •(3, 0) x
(3, 0) (5, 0)
• •
x
Option 1 Option 2
y y
r(x)
Option 3 Option 4
13
.
14
10. If a, b and c are the roots of the polynomial x3 + 13x − 10 and sum of the roots is 0,
then find the value of a3 + b3 + c3.
(NAT)(Ans: 30) [Marks:2]
15
Statistics for Data Science-1
The phone brands OnePlus, Vivo and Oppo are owned by B B K Electronics. Table 4.1.G
represents the data for the sales (in Lakhs) of OnePlus and B B K Electronics by different dealers
in Chennai and Punjab in the year 2010. Based on the given information, answer questions (1),
(2), (3), (4), (5) and (6).
Dealer’s Location OnePlus B B K Electronics
Chennai a b
Punjab c d
Chennai e f
Punjab g h
Chennai i j
Punjab k I
Chennai m n
Table 4.1.G
Condition: 1 ≤ a, c, e, g, i, k, m ≤ 7 and 10 ≤ b, d, f , h, j , I, n ≤ 20
1. What is the population standard deviation of sales of OnePlus?
Solution:
Let mx and σx be the mean and population standard deviation of sales of OnePlus
respectively.
a+ c+ e+ g+ i + k + m
mx = 7
2 2 2 2 2 2 2
(a − m x ) + (c − m x ) + (e − m x ) + (g − m x ) + (i − m x ) + (k − m x ) + (m − m x )
σ2x = 7 √
Therefore, Population standard deviation of sales of OnePlus= σ2x
2. What is the sample standard deviation of sales of B B K Electronics?
Solution:
Let my and S y be the mean and sample standard deviation of sales of B B K Electronics
respectively.
b+ d + f + h + j + I + n
my = 7
2 2 2 2 2 2 2
2
S = (b − m y ) + (d − m y ) + ( f − m y ) + (h − m y ) + ( j − m y ) + (I − m y ) + (n − m y)
y 7− 1 √
Therefore, Standard deviation of sales of B B K Electronics= S 2y
3. What is the sample co−variance between the sales of OnePlus and B B K Electronics?
Solution:
1
Let X = Sales of OnePlus
Y = Sales of B B K Electronics.
Σ 7
( x i − m x )(y i − m y)
Therefore, Cov ( X, Y ) = i=1
7− 1
(a − m x )(b − m y ) + (c − m x )(d − m y ) + (e − m x )( f − m y ) + (g − m x )(h − my)
= (i − m ) ( j − m ) + (k − m )(I − 6
x y x y – m x )(n − my)
m ) + (m
+
6
4. What is the correlation coefficient between the sales of OnePlus and B B K Electronics?
Solution:
Let r be the correlation coefficient between the sales of OnePlus and B B K Electronics.
Therefore,
Cov ( X, Y )
r=
S x × Sy
where,
Cov( X, Y) = Sample Covariance between sales of OnePrlus and B B K rElectronics.
n 7
S x = Sample standard deviation of sales of OnePlus= σx = σx
n− 1 6
S y = Sample standard deviation of sales of B B K Electronics.
5. What can you say about the linear relationship between the sales of OnePlus and B B K
Electronics?
a. Strong
b. Positive
c. Weak
d. Negative
e. Absence of linear relationship
f. Moderate
Solution: x
If 0.75 ≤ r ≤ 1, then there is a Strong and positive linear relationship between the
sales of OnePlus and B B K Electronics.
If 0.5 ≤ r ≤ 0.75, then there is a Moderate and positive linear relationship between
the sales of OnePlus and B B K Electronics.
If 0.25 ≤ r ≤ 0.5, then there is a Weak and positive linear relationship between the
sales of OnePlus and B B K Electronics.
If −0.25 ≤ r ≤ 0.25, then there is absence of linear relationship between the sales of
OnePlus and B B K Electronics.
If −0.5 ≤ r ≤ −0.25, then there is a Weak and negative linear relationship between
2
the sales of OnePlus and B B K Electronics.
If −0.75 ≤ r ≤ −0.5, then there is a Moderate and negative linear relationship between
the sales of OnePlus and B B K Electronics.
If −1 ≤ r ≤ −0.75, then there is a Strong and negative linear relationship between the
sales of OnePlus and B B K Electronics.
a. Yes
b. No
Solution:
Let Chennai be represented by 0 and Punjab by 1.
The Point Bi−serial correlation coefficient between the sales of OnePlus and the loca−
tion of dealer is given by:
¯ ¯ √
r pb = ( Y 0 − Y 1) × p0 × p1
σx
4
where, p0 = Proportion of Chennai dealers = 7
3
p1 = Proportion of Punjab dealers = 7
a+ e+ i + m
Y¯0 = Mean sales of OnePlus in Chennai = 4
c+ g+ k
Y¯1 = Mean sales of OnePlus in Punjab =
3
σx = Population standard deviation of sales of OnePlus
r
( Ȳ 0 − Y¯1) 4 3 (Y¯0 − Y¯1)
r pb = × × = × 0.49487
σx 7 7 σx
If 0.75 ≤ |rpb| ≤ 1, then the sales of OnePlus is strongly influenced by the loca−
tion of dealer.
Else, the sales of OnePlus is not strongly influenced by the location of dealer.
N college students are classified according to their intelligence level and economic
conditions and the results are given in Table 4.2.G.
3
Economic Conditions Intelligence level
Bright Average Dull Borderline
Good a b c d
Poor e f g h
Table 4.2.G
Based on the given information answer questions (7), (8), (9), (10) and (11).
Condition: 50 ≤ a ≤ 70, 80 ≤ b ≤ 120, 50 ≤ c ≤ 90, 120 ≤ d ≤ 150, 50 ≤ e ≤ 70,
70 ≤ f ≤ 110, 70 ≤ g ≤ 90 and 70 ≤ h ≤ 110
a + b+ c + d + e + f + g + h
9. What proportion of students of good economic conditions are borderline?
Solution:
d
Required proportion =
a + b+ c + d
10. What percentage of bright students are in poor economic conditions?
Solution:
e
Required percentage = × 100
a+ e
4
(d)
Solution
Question 1 [3 Marks]
Statement
For which of the following situations is a nested loop needed? Assume that no procedure is used.
It is a Multiple Select Question (MSQ).
Options
(a)
To find the number of words with at least two vowels from the "Words" dataset
(b)
To find the pair of students who share the same birthday from the "Scores" dataset
(c)
To find the number of students whose Physics marks are greater than average Physics marks
(d)
To find the number of bills from the same shop from the “Shopping Bills” dataset
Solution
We will check each and optios one by one:
Option (a): It requires nested loop to find the number of words with at least two vowels from the
"Words" dataset. The outer loop iterates through the each words and and the inner loop will
iterate through the each letters of that word.
Option (b): For finding the pair of students who share the same birthday requires nested loop.
The outer loop fix one of the student's birthday and the inner loop compares with remaining
student's birthday.
Option (c): In this case nested loop is not required. The first loop will find the average Physics marks
and the second loop will find the number of students whose Physics marks are greater than
average Physics marks.
Options
(a)
(b)
(c)
(d)
Solution
In this pseudocode nested while loop is used in which outer loop iterates through each word and
the inner loop iterates through the each letters of that word. The variable B is updated to False
whenever a vowel is found in a word. Therefore variable A counts those words which do not have
vowels. Therefore the correct option is (c).
Question 3 [4 Marks]
Statement
The following pseudocode is executed using the “Olympics” dataset. What will C represent at the
end of the execution? Assume that none of the players have won more than one medal.
if(findpair(X, Y)){
Options
(a)
(b)
(c)
(d)
Number of pairs of players who won the same medals in different sports
Solution
In this pseudocode nested while loop is used which find pairs of players. Now we investigate the
pseudocode closely. The variable C is incremeted whenever procedure findPair(X, Y) returns
True. The procedure findPair(X, Y) returns True for pair of players who participated in the same
sport but won the different medals. Therefore, variable C counts the number of pairs of players
who won different medals in same sports.
Question (4-4)
Statement
The following pseudocode is executed using the “Library” dataset. Assume that all authors have
distinct names and each book is written by a single author.
Question 4 [3 Marks]
statement
What will N represent at the end of execution?
Options
(a)
(b)
(c)
Solution
The above pseudocode is executed on the "Library" dataset.
Line 3: One row X is being selected and it is being moved to table 2 (line 4).
Inner while loop (Line 5 - 14): A row is being selected and checked if it has the same author who
was in X too then A is being incremented. As A is already initialized to 1, that means for the first
book with same author A is assigned 1. Therefore, A counts the number of book written by same
author which was in row X.
Simultaneously if author is same and then the row is being moved to Table 2 otherwise in Table 3. Table
3 is being restored which means Table 2 is being used as dump so that once the inner loop gets
finished, the same author will not be visible.
After reading all the books in the inner while loop, variable A is compared with variable N. If A is
more than N then value of A is stored in N. Therefore we can say that variable N finds the
maximum number of books written by an author. After storing the value of A in N once if-block
statement is satisfied, A is reinitialized to 1 for the new card X. Hence the correct option is (a).
Question 5 [4 Marks]
Statement
What will count represent at the end of execution?
Options
(a)
(b)
Number of authors
(c)
(d)
Solution
Variable count is incremented once the inner while loop ends. This means variable count only
gets incremented for X and X belongs to distinct authors only. Therefore, count counts the
number of authors. Since the duplicate books (means books written by the same author is placed
into the Table 2 and these are not read again). The correct option in (b).
Question 6 [5 Marks]
Statement
The following pseudocode is executed using the “Words” dataset. What will count represent at
the end of execution?
Options
(a)
(b)
(c)
(d)
Number of words in which neither two vowels nor two consonants occur consecutively
Solution
The given pseudocode is executed on the "Words" dataset which includes nested while loop.
Initially variable C is set to 0 and it is updated to 1 in inner while whenever desired situation is
found. Now we check inside inner while loop block.
Let us assume if the first letter of the word X is a vowel then variables A and B will be set as True
and False respectively. Assume if the second letter is also a vowel then flow of code will reach to
if-block "if(A and not B)". This will be ultimately True. Therefore C will be updated to 1. This means
C is updated to 1 for two consecutive vowels. And also when we will have two consecutive two
consonants (in else-block), C will be updated to 1. Hence variable count will count all words
except the words in which two vowels or two consonants occur consecutively. Therefore the
correct option is (e).
Question 7 [5 Marks]
Statement
The following pseudocode is executed using the “Words” dataset. What will count represent at
the end of execution?
Options
(a)
(b)
(d)
Solution:
The following pseudocode is executed on the "Words" dataset which include nested while loop. It
also incudes a procedure called doSomething. It returns True for the case A is 1. Now let us
investigate the procedure doSomething.
In procedure doSomething, both variables A and B are set to False. Now let us look inside the
while loop block. Variable B is updated to True for vowels and False for consonants. Let us
assume the current letter is a vowel then B will be set to True and assume that the next letter is
also a vowel then variable A is updated to 1. Then Flag will be updated to True. And finally
procedure will return as True. Then it looks like variable count will count number of pairs of
words with at least two consecutive vowels.
Question 8 [5 Marks]
Statement
Two words are said to be conjugate if they fulfill following conditions:
The given pseudocode is executed using the “Words” dataset. The variable count in the given
pseudocode counts the number of conjugate pairs. But the pseudocode may have mistakes in
one or more lines. Identify all such lines (if any). Assume that all statements not listed in the
options below are free of errors. It is a Multiple Select Question (MSQ).
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 return(vowelCount)
26
Options
(a)
Line 8: Invalid parameter is used to call the procedure inside the conditional statement
(b)
Line 8: Incorrect condition to update count as the number of consonants are not being compared
(c)
(d)
(e)
No mistake
Answer
(e)
Solution
The given pseudocode counts the number of conjugate pairs. But the pseudocode may have
mistakes in one or more lines which we have to find. It is also given in the question that
statements not listed in the options below are free of errors. So we have to find the errors in the
statements which are listed in the option. We look into options one by one:
Option (a): There is in no any error since procedure is called with one argument, X, which it
accepts.
Option (b): The increment of variable count depends on the if-block. The if-block sets True for
the case of same number of vowels in both the words. Second condition (consonants) will get
fulfilled by itself as letter count is already checked.
Therefore, no mistakes.
Question (9-10)
Statement
The following pseudocode is executed using the “Scores” dataset. A student can join a subject club
if his/her subject score is above 80. The variables M, P and C store the number of students in
Mathematics, Physics and Chemistry clubs respectively.
Question 9 [5 Marks]
statement
Which club can a student join if he/she gets 85 marks in all three subjects?
Options
(a)
Physics club
(b)
Chemistry club
(c)
Mathematics
(d)
Solution
The joining of a club will depend on the return value of the procedure maxSubject. In this
question it is given that a student got 85 marks in all subjects. The procedure maxSubject will be
called. In the procedure firstly Physics marks is compared with Mathematics marks. Since Physics
marks is same as Mathematics marks, the if-block sets to be False and flow of the code will go to
else-block. Inside the else-block, Mathematics marks is compared with Chemistry marks. Since
Mathematics marks is same as Chemistry marks, the if-block sets to be False and flow of the code
will go to else-block and "Chemistry" will be retun. Now the value stored in variable subject is
"Chemistry". Since Chemistry marks is 85 which is more than 80, variable C will be incremented.
Therefore a student who will get more 80 and same marks in all subjects. He/she will join
Chemistry club. The correct option is (b).
Question 10 [4 Marks]
Statement
When can a student join more than one club?
Options
(a)
(b)
(c)
If the student gets more than 80 marks and the same marks in Physics and Chemistry
(d)
Solution
From the previous question we saw that joining of a club depends upon the return value of
procedure maxSubject and it returns only one value which is further compared in the main part
of the code. Hence a student can join only one club if he/she gets more than 80 marks in that
subject. Hence the correct option is (d).
Question (11-12)
Statement
The following pseudocode is executed using the “Words” dataset.
Question 11 [4 Marks]
statement
What will A represent at the end of execution?
Options
(a)
Number of words after the first verb in every sentence which are not nouns
(b)
Number of words after the first nouns in every sentence which are not verbs
(c)
Number of words before the second verb in every sentence which are not nouns
(d)
Number of words which appear before the first noun in every sentence
(e)
Number of words other than verbs which appear before the first noun in every sentence
Solution
The given pseudocode is executed on the "Words" dataset. The increment of variable A depends
on the variable Q. Variable A is incremented for False value of Q. Since it check for "not Q". The
variable Q is set as False initially and set to True when a noun is found. Hence variable A will count
the number of words which appear before the first noun in every sentence.
Question 12 [4 Marks]
Statement
What will B represent at the end of execution?
Options
(a)
(b)
(c)
(d)
Solution
The increment of B depends on Q even though part of speech of a word is noun. Q is initially
False and set to be True when a noun is found. Hence B will count number of verbs after the first
noun in every sentence.
Week 4 CT Graded Assignment
1. Consider the ”Olympics” dataset. The procedure doSomething is written such that the pseudocode computes the
number of pairs of winners with the same Nationality and gender. Choose the correct choice to complete the
pseudocode.
count = 0
while(Table 1 has more rows) {
Read the first row X in Table 1
Move X to Table 2
while(Table 1 has more row) {
Read the first row Y in Table 1
count = count + doSomething(X,Y)
Move Y to Table 3
}
Move all rows from Table 3 to Table 1
}
Procedure doSomething(A,B)
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\* Fill the code *
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
End doSomething
return(1)
}
else{
return(0)
}
b. if(A.Nationality == B.Nationality and A.Gender == B.Gender){
return(1)
}
return(1)
}
d. if(A.Nationality == B.Nationality or A.Gender == B.Gender) {
return(1)
}else{
return(0)
}
6 points
2. The given pseudocode is executed using the ”Library” table to count the number of pairs of books where both
either have the same genre or the same year. But the pseudocode has some mistakes. Identify all such mistakes (if
any).
1.count = 0
2. while(Table 1 has more rows){
3. Read the first row X in Table 1
4. Move X to Table 2
5. while(Table 2 has more rows){
6. Read the first row Y in Table 1
7. count = count + doSomething(X,Y)
8. Move Y to Table 3
9. }
10. Move all rows from Table 3 to Table 1
11.}
12. Procedure doSomething(A,B)
13. if(A.Genre == B.Genre and A.Year == B.Year){
14. return(0)
15. }else{
16. return(1)
17. }
18. End doSomething
5 points
3. The following pseudocode is executed using the ”Words” table. Assume that the procedure doSomething will take a
table as a parameter and return the number of words. Then, what will the values of A and B represent at the end of the
execution?
A = 0, B = 0
while(Table 1 has more rows) {
Read the first row X in Table 1
if(1 <= X.LetterCount <= 5){
Move X to Table 2
}
if(6 <= X.LetterCount <= 11){
Move X to Table 3
}
}
A = doSomething(Table 2)
B = doSomething(Table 3)
(a) Number of words with the same two sets of letter count
(b) Pairs of words with a letter count less than 5 but greater than 1
(c) Pairs of words with a letter count less than 11 but greater than 6
(d) Number of words with the two different sets of letter count
5 points
4. In which of the following situation(s) is/are a nested loop needed? It is a Multiple Select Question.
(a) To find the pair of books published in the same year from the ”Library” dataset
(b) To find the number of bills with a total bill amount greater than the average bill amount of the
particular store from the ”Shopping bill” dataset
(c) To find the pair of winners from the the same host country from the ”Olympics” dataset
(d) To find the number of words having a letter count greater than 2 but less than 5 from ”Words”
dataset
4 points
5. The following pseudo code is executed using the ”Scores” dataset. What will C represent at the end of the
execution?
C=0
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
while(Table 1 has more rows){
Read the first row Y in Table 1
if(findPair(X,Y)) {
C=C+1
}
Move Y to Table 3
}
Move all rows from Table 3 to Table 1
}
Procedure findPair(X,Y)
if(X.Chemistry == Y.Chemistry) {
if(X.Physics == Y.Physics) {
if(X.Mathematics == Y.Mathematics){
return(False)
}
}
}else{
return(True)
}
End findPair
(a) Number of pairs of students having equal marks in all three subjects
(b) Number of pairs of students not having equal marks in at least one of the subjects
(c) Number of pairs of students not having equal marks in all three subjects
(d) Number of pairs of students having equal marks in at least one of the subjects
4 points
6. Consider the ”Scores” dataset. In the following pseudocode
procedure isCity returns CityTown and isGender returns the Gender of student. What will R represent at the end of
execution?
aCount = 0 , bCount = 0
while(Pile 1 has more cards){
if(isCity(X) == ”Chennai”){
aCount = aCount + 1
if(isGender(X) == 'M'){
bCount = bCount + 1
}
}
Move X to Pile 2
}
R = bCount/aCount
}
(a) The ratio of the number of male students from Chennai to the number of students from Chennai
(b) The ratio of the number of male students from Chennai to the number of female students from
Chennai
(c) The ratio of the number of male students to the number of students from Chennai
(d) The ratio of the number of male students from Chennai to the number of male students from
Chennai
4 points
Consider the following details and answer Q7 - Q8
The following pseudo code is executed using the ”Library” dataset.
A = 0, B = 0
P = True, Q = False
while(Table 1 has more rows) {
Read the first row X in Table 1
if(X.Language == ”English” and P) {
P = False
Q = True
}
if(X.Genre == ”Fiction” and Q) {
B=B+1
}
if(not Q) {
A=A+1
}
Move X to Table 2
}
4 points
8. What will B represent at the end of execution?
5 points
Consider the following details and answer Q9-Q10
The following pseudo code is executed using the ”Shopping Bill” dataset.
}
if(X.ShopName == ”Sun General” ){
Move X to Table_SG
}
if(X.ShopName == ”Big Bazar” ) {
Move X to Table_BB
}
}
findSomething(Table_SV)
findSomething(Table_SG)
findSomething(Table_BB)
Procedure findSomething(Table_ShopName)
Count = 0 , sBA = 0
while(Table_ShopName has more rows){
Read the first row X in Table_ShopName
Count = Count + 1
sBA = sBA + X.TotalBillAmount
Move X to Table 2
}
R = sBA/Count
B=0
while(Table 2 has more rows) {
Read the first row X in Table 2
if(X.TotalBillAmount < R){
B=B+1
}
Move X to Table 3
}
return B
End findSomething
(b) The ratio of the cost of all items to the number of items
(c) The ratio of the bill amount of one customer to the number of bills
5 points
10. What will B represent at the end of execution?
(a) Number of customers who purchased less than the average bill amount of a particular store
(b) Number of customers who purchased less than the average cost of shopping bill items
(c) Number of customers who purchased less than the ratio of the bill amount of one customer to the
number of bills
(d) Number of customers who purchased less than the ratio of the cost of all items to the number of
items
Week 4 Stat Graded Assignment
First Question is the common data. Use the data in the question 1 to answer from Question number 2 to question number
7.
0 points
The phone brands OnePlus, Vivo and Oppo are owned by BBK Electronics. Table 4.1.G represents the data for the
sales (in Lakhs) of OnePlus and BBK Electronics by different dealers in Chennai and Punjab in the year 2010.
1. Are you able to see 7 dealer's location and the sales of OnePlus and BBK Electronics?
Yes
No
2. What is the population standard deviation of sales of OnePlus?(Enter the answer correct to 2 decimal accuracy)
Accepted Answers:
1 point
3. What is the sample standard deviation of sales of BBK Electronics?(Enter the answer correct to 2 decimal
accuracy)
Accepted Answers:
1 point
4. What is the sample co-variance between the sales of OnePlus and BBK Electronics?(Enter the answer correct to 2
decimal accuracy)
Accepted Answers:
1 point
5. What is the correlation coefficient between the sales of OnePlus and BBK Electronics?(Enter the answer correct to
2 decimal accuracy)
Accepted Answers:
1 point
1 point
6. What can you say about the linear relationship between the sales of OnePlus and BBKElectronics?(More than one
option can be correct)
Weak
Positive
Moderate
Negative
Strong
Accepted Answers:
Positive
Moderate
1 point
7. ls the sales of OnePlus strongly influenced by the location of dealer?
No
Yes
Accepted Answers:
No
8th Question is the common data. Use the data in the question 8 to answer from Question number 9 to question number 13.
651 college students are classified according to their intelligence and economic conditions and the results are as
follows.
Economic Conditions lntelligence level
Good 50 93 64 127
Poor 59 90 88 80
8. Are you able to see all the eight values in a contigency Table Q4.2.G?(Type 0 for No and type 1 for Yes)
Accepted Answers:
(Type: Numeric) 1
0 points
9. What proportion of total students are dull? (Enter the answer correct to 2 decimal accuracy)
Accepted Answers:
1 point
10. What proportion of total students are in poor economic conditions? (Enter the answer correct to 2 decimal
accuracy)
Accepted Answers:
1 point
11. What proportion of students of good economic conditions are borderline? (Enter the answer correct to 2
decimal accuracy)
Accepted Answers:
1 point
12. What percentage of bright students are in poor economic conditions? (Enter the answer correct to 2 decimal
accuracy)
Accepted Answers:
So far as the/ ultimate goal/ is concerned/ I think none of us need/ have any apprehensions None/ of
us need have any doubt//
So far/ as the ultimate/ goal is concerned/ I think none of us/ need have any apprehensions// None of
us need/ have any doubt//
1 point
2) Our difficulty is how to make the heterogeneous mass that we have today take a decision in common and march
in a cooperative way on that road which is bound to lead us to unity
Our difficulty/ is how to make the/ heterogeneous mass that/ we have today take/ a decision in
common/ and march/ in a cooperative way on that road which is/ bound to lead us to unity//
Our difficulty is/ how to make/ the heterogeneous mass/ that we have today/ take a decision/ in
common/ and march in a cooperative way/ on that road/ which is bound to lead us to unity//
Our difficulty is/ how to/ make the heterogeneous mass/ that/ we have today/ take a decision/ in
common and/ march in a cooperative way on that road/ which is bound to lead us to unity//
1 point
3) Our difficulty is not with regard to the ultimate our difficulty is with regard to the beginning
Our difficulty/ is not/ with regard to the ultimate/ our difficulty/ is with regard to the beginning// Our
difficulty is/ not with regard to/ the ultimate our difficulty/ is with regard to the beginning// Our
difficulty is not with regard to the ultimate/ our difficulty is with regard to the beginning//
1 point
4) Mr. Chairman therefore I should have thought that in order to make a start in order to induce every party every
section in this country it would be the act of greatest statesmanship for the majority party even to make a
concession to the prejudices of people who are not prepared to march together and it is for that that I propose to
make this appeal
Mr. Chairman/ therefore I should have thought that/ in order to make/ a start in order to induce/ every
party every section/ in this country it would be/ the act of greatest statesmanship for the majority
party/ even to make a concession/ to the prejudices of people who are not prepared to march
together and it is for that that I propose to make this appeal//
Mr. Chairman therefore/ I should have thought/ that in order to make a start/ in order to induce/ every/
party/ every section/ in this country/ it would be the act of greatest statesmanship/ for the majority
party/ even to make a concession to the prejudices/ of people who are not prepared to march together/
and it is for that/ that I propose to make this appeal//
Mr. Chairman therefore/ I should have thought that/ in order to make a start/ in order to induce/ every
party/ every section/ in this country/ it would be the act of greatest statesmanship/ for the majority
party/ even to make a concession to the prejudices/ of people who are not prepared to march
together and/ it is for that that I propose to make this appeal//
1 point
5) Let us leave aside slogans let us leave aside words which frighten people
Let us leave/ aside slogans/ let us leave/ aside words which frighten people//
Let us leave aside slogans/ let us leave/ aside words which frighten people//
Let us leave aside slogans/ let us leave aside words which frighten people//
1 point
6) Mark the appropriate response.
Deepthi is not here. Could you please .
Speak up
Hang up
Hang on
1 point
7) When someone says “Your voice is echoing” it becomes evident the voice is resurfacing and hence the tele-
conversation is not clear.
True
False
F
8) The phrase ‘speak up’ means to tone down the voice.
True a
lse 1 point
1 point
9) Geetha, while speaking to Mary (on the phone) hears vibrating noise. Choose the best appropriate sentence that
Geeta should use to convey the problem.
Your voice is echoing.
1 point
I0) The phrase ‘pick up’ (in the context of a telephonic conversation) means to answer the call.
True
False
Week 4 Maths Graded Assignment
If Your Questions Doesn't Matches Don’t Panic Click Here To Access Master Video Solutions )
4. An ant named B, wants to climb an uneven cliff and reach its anthill (i.e., home of ant). On its way home, B
makes sure that it collects some food. A group of ants have reached the food locations which are at x-
intercepts of the function f(x) = (x²-20) ((x-7)³-1) As ants secrete pheromones (a form of signals which other ants
can detect and reach the food location), B gets to know the food location. Then the sum of the x- coordinates
of all the food locations is
The phone brands OnePlus, Vivo and Oppo are owned by BBK Electronics. Table 4.1.G
represents the data for the sales (in Lakhs) of OnePlus and BBK Electronics by different
dealers in Chennai and Punjab in the year 2010. Based on the given information, answer
questions (1), (2), (3), (4), (5) and (6).
Dealer’s Location OnePlus BBK Electronics
Chennai a b
Punjab c d
Chennai e f
Punjab g h
Chennai i j
Punjab k l
Chennai m n
Table 4.1.G
1. What is the population standard deviation of sales of OnePlus?(Enter the answer cor-
rect to 2 decimal accuracy)
Solution:
Let mx and σx be the mean and population standard deviation of sales of OnePlus
respectively.
a+c+e+g+i+k+m
mx =
7
2
σx = (a − m x) + (c − mx) + (e − mx) + (g − mx) + (i − mx) + (k − mx) + (m − mx)
2 2 2 2 2 2 2
7
√
Therefore, Population standard deviation of sales of OnePlus= σ2x
2. What is the sample standard deviation of sales of BBK Electronics?(Enter the answer
correct to 2 decimal accuracy)
Solution:
Let my and Sy be the mean and sample standard deviation of sales of BBK Electronics
respectively.
b+d+f +h+j +l+n
my = 7
2
S = (b − m y )2 + (d − m )2 + (f − m )2 + (h − m )2 + (j − m )2 + (l − m )2 + (n − m )2
y y y y y y
y
7−1 √ 2
Therefore, Standard deviation of sales of BBK Electronics= Sy
3. What is the sample co-variance between the sales of OnePlus and BBK Electron-
1
ics?(Enter the answer correct to 2 decimal accuracy)
2
Solution:
Let X= Sales of OnePlus
Y= Sales of BBK Electronics.
Σ7 (xi − mx)(yi − my)
Solution: x
If 0.75 ≤ r ≤ 1, then there is a Strong and positive linear relationship between the
sales of OnePlus and BBK Electronics.
If 0.5 ≤ r < 0.75, then there is a Moderate and positive linear relationship between
the sales of OnePlus and BBK Electronics.
If 0.25 ≤ r < 0.5, then there is a Weak and positive linear relationship between the
3
sales of OnePlus and BBK Electronics.
If −0.25 < r < 0.25, then there is absence of linear relationship between the sales of
4
OnePlus and BBK Electronics.
If —0.5 < r ≤ −0.25, then there is a Weak and negative linear relationship between
the sales of OnePlus and BBK Electronics.
If —0.75 < r ≤ −0.5, then there is a Moderate and negative linear relationship between
the sales of OnePlus and BBK Electronics.
If —1 ≤ r ≤ −0.75, then there is a Strong and negative linear relationship between the
sales of OnePlus and BBK Electronics.
a. Yes
b. No
Solution:
Let Chennai be represented by 0 and Punjab by 1.
The Point Bi-serial correlation coefficient between the sales of OnePlus and the loca-
tion of dealer is given by:
rpb = (Ȳ 0 − Ȳ 1 ) × √p0 × p1
σx 4
where, p0 = Proportion of Chennai dealers =
7
3
p1 = Proportion of Punjab dealers =
7 a+e+i+m
Y¯ 0 = Mean sales of OnePlus in Chennai =
4
c+g+k
¯
Y 1 = Mean sales of OnePlus in Punjab =
3
σx = Population standard deviation of sales of OnePlus
r
(Ȳ 0 − Ȳ 1 ) 4 3 (Ȳ 0 − Ȳ 1 )
r = × × = × 0.49487
pb
σx 7 7 σx
If 0.75 ≤ |rpb | ≤ 1, then the sales of OnePlus is strongly influenced by the loca-
tion of dealer.
Else, the sales of OnePlus is not strongly influenced by the location of dealer.
5
N college students are classified according to their intelligence level and economic
conditions and the results are given in Table 4.2.G.
Table 4.2.G
Based on the given information answer questions (7), (8), (9), (10) and (11).
7. What proportion of total students are dull?(Enter the answer correct to 2 decimal
accuracy)
Solution: c+g
Proportion of dull students = .
a+b+c+d+e+f +g+h
8. What proportion of total students are poor economic conditions?(Enter the answer
correct to 2 decimal accuracy)
Solution:
e+f +g+h
Proportion of students having poor economic conditions = .
a+b+c+d+e+f +g+h
9. What proportion of students of good economic conditions are borderline?(Enter the
answer correct to 2 decimal accuracy)
Solution:
d
Required proportion =
a+b+c+d
10. What percentage of bright students are in poor economic conditions?(Enter the answer
correct to 2 decimal accuracy)
Solution:
e
Required percentage = × 100
a+e
11. What percentage of average students are in good economic conditions?(Enter the an-
swer correct to 2 decimal accuracy)
Solution:
b
Required percentage = × 100
b+f
6
1
1 Multiple Select Question (MSQ)
1. Consider the line (Lx) and parabola (Px) as shown in below figure.
2
⃝
⃝
Solution:
The equation of Lx from the graph is f (x) = 3x − 9
3
The equation of Px from the graph is f (x) = 3x2 − 18x + 27
is
4
2. Consider f (x) = x3 −4x2 −17x + 60 and g(x) = x3 + 5x2 −8x −12, whose one of the
roots are given in the set {3, 2, −3,−2}. Choose the set of correct options regarding
f (x) and g(x).
Answer: Option b [MSQ:1 marks]
⃝ The f (x) cuts the X-axis at 3, 5 and 4.
⃝ The g(x) cuts the X-axis at 2, -6 and -1.
⃝ If x ∈ (−6, 2), then g(x) is positive.
⃝ f (x) is negative when x ∈ [−4, 3] ∪ (3, ∞).
⃝ g(x) is positive when x ∈ (−∞, −6) ∪ (−1, −2).
Solution: From the given set, x = 3 is one of the root of f (x), since f (3) = 0. To find
x3 − 4x2 − 17x + 60
the other roots: = x2 −x−20 ⇒ x = −4, 5 So, option a is incorrect.
x−3
From the given set, x = 2 is one of the root of g(x), since g(2) = 0. To find the other
x3 + 5x2 − 8x − 12
roots: = x2 + 7x + 6 ⇒ x = −6, −1 So, option b is correct.
x−2
6
3. Consider a rectangular box whose length is x, height is 3 units less than length, and breadth
is 5 units more than height. If the volume of the rectangular box is 24 unit3, then
choose the correct value of x from the given options.
Answer: Option b [NAT:1 marks]
⃝ 3
⃝ 4
⃝ 5
⃝ 2
Solution:
Let the length of rectangular box be x, then the height is h = x — 3
and breadth is b = h + 5 = x — 3 + 5 = x + 2. The volume of rectangular box is given
by l × b× h.
V = x(x − 3)(x + 2) = x(x2) = x(x2 − x − 6) = x3 − x2 − 6x.
Given that volume of the rectangular box is 24 unit3, that is,
x3 − x2 − 6x = 24
So, from the given options, option b satisfied the given equation.
7
4. Consider a polynomial function f (x) of degree 4 which intersects the X-axis at x = 2, x =
− 3 and x = − 4. Moreover, f (x) < 0 when x ∈ (1, 2), and f (x) > 0 when x ∈ (− 1, 1).
Find out the equation of the polynomial.
Answer: Option b [MSQ:1marks]
⃝ a(x − 2) (x2 + 27x + 12), a > 0
⃝ a(x4 + 4x3 — 7x2 — 22x + 24), a > 0
2 2
8
5. Consider a polynomial function f (x) = −1 (x − 2)2 (x − 3) (x + 1)2 (x + 4) (x − 5). Choose
300
the correct set of options.
Answer: Option b,c,d and e [MSQ:1 marks]
⃝ The function f (x) has exactly 7 turning points.
⃝ The function f (x) has exactly 6 points where the slope is 0.
⃝ The function f (x) is neither even nor odd function.
⃝ In the interval x ∈ (3, 5), f (x) is increasing first and then decreasing.
⃝ The function f (x) is negative when x ∈ (−1, 2).
Solution:
• We can seen that f (x) has exactly 6 turning points. So, option b is correct.
• In the interval x ∈ (3, 5), f (x) is increasing first and then decreasing. So, option d
is correct.
9
• The function f (x) is negative when x ∈ (−1, 2). So, option e is correct.
Also, if we replace x by− x in f (x), then f ( −x) ≠ − f (x) or f ( −x) ≠f (x). So, f (x) is
neither even nor odd function.
10
6. Consider a polynomial function P (x) = (x4 + 4x3 + x + 10) and Q(x) = (x3 + 2x2 — 6).
If M (x) is the equation of the straight line passing through (2, Q(2)) and having slope
3, then find out the equation of P (x) + M (x)Q(x).
Choose the correct option.
Answer: Option A [MSQ:1 marks]
⃝ 4x4 + 14x3 + 8x2 — 17x − 14
4 3 2
⃝ 4x + 14x — 6x — 19x − 34
⃝ 4x4 + 2x3 + 8x2 — 17x − 14
⃝ 4x4 + 2x3 + 8x2 — 18x − 34
Solution:
M (x) is the equation of the straight line passing through (2, Q(2)) = (2, 10) and having
slope 3.
The equation of M will be , M (x) = 3x +4
P (x) + M (x)Q(x) = (x4 + 4x3 + x + 10) + (3x + 4)(x3 + 2x2 − 6)
= (x4 + 4x3 + x + 10) + (3x4 + 6x3 − 18x + 4x3 + 8x2 − 24)
= 4x4 + 14x3 + 8x2 − 17x − 14
11
2 Numerical Answer Type (NAT):
7. A function f (x) which is the best fit for the data given in the Table-1 recorded by a
student, is
f (x) = − (x − 1)2 (x − 3) (x − 5) (x − 7) + c
What will be the value of c, so that SSE (Sum Squared Error) will be minimum?
(NAT)( Ans: 3.4) [Marks:1]
x 1 2 3 4 5
y 4 18 4 −24 3
Table-1
Solution:
2
xi yi f (xi) (yi − f (xi))
2
1 4 c (4 − c) 2
2 18 15 + c (3 − c) 2
3 4 c (4 − c) 2
4 −24 −27 + c (3 − c) 2
5 3 c (3 − c)
12
8. An ant named B, wants to climb an uneven cliff and reach its anthill (i.e., home of
ant). On its way home, B makes sure that it collects some food. A group of ants
have reac hed the food locations which are at x−intercepts of the function f (x) =
3
(x2 − 19) (x − 9) − 1 . As ants secrete pheromones (a form of signals which other
ants can detect and reach the food location), B gets to know the food location. Then the
sum of the x-coordinates of all the food locations is
(NAT) (Answer: 10)
Solution:
Given that, a group of ants have reached the food locations which are at x— intercepts,
which means, x-coordinates of all the food locations are same as the roots of the poly-
nomial, f (x) = (x2 − 19) (x − 9)3 − 1
(x2 − 19) (x − 9)3 − 1 = 0
(x2 − 19) = 0 or ((x −√9) −3 1√) = 0
(x2 − 19) = 0 ⇒ x = 19, − 19
3
((x − 9) − 1) = 0 ⇒ x = 10
13
10. Let r(x) be a polynomial function which is obtained as the quotient after dividing the
polynomial p(x) = (x + 5) (x − 3) (x2 − 4) by the polynomial q(x) = (x − 2) (2 + x).
Choose the correct option which represents the polynomial r(x) most appropriately.
(MSQ)(Ans: Option 1) [Marks:1]
Option 1 Option 2
Option 3 Option 4
14
Solution: p(x) = (x + 5) (x − 3) (x2 − 4) and q(x) = (x − 2) (2 + x)
p(x) 2 (x + 5) (x − 3) (x + 2) (x − 2)
= (x + 5) (x − 3) (x − 4) = = (x + 5) (x — 3)
q(x) (x − 2) (2 + x) (x − 2) (2 + x)
Option 1 is correct.
15