The following pseudocode is executed using the "Words" dataset. For a list **L**, let **unique(L)** return
the list of unique elements of **L**. What will **wCount** represent at the end of the execution of the
pseudocode? Ignore upper and lower case, and punctuation symbols while comparing words.
6406536002423.
Dictionary with words as keys mapped to the number of sentences in which
the word is present.
6406536002424.
Dictionary with words as keys mapped to the frequency count of the word in
the dataset.
6406536002425.
Dictionary with words as keys mapped to the maximum frequency of the word
in a sentence.
6406536002426.
Dictionary with words as keys mapped to the number of sentences in which
the word is present more than one time.
A published solution is not available for this question yet.
The following pseudocode is executed using the **"Words"** dataset. **PatternMatching** is the
process of checking whether a smaller string (**Pattern**) occurs within a larger string (**Text**). The
pseudocode compares the pattern against all possible positions in the text.
What is the value returned by **PatternMatching("Swaminathan","nat")**?
6406536002431.
3
6406536002432.
5
6406536002433.
7
6406536002434.
9
A published solution is not available for this question yet.
The following pseudocode is executed using the "Scores" table. At the end of the execution, **A**
captures the number of pairs of students who have scored the same marks in all subjects. Choose
the correct code fragment to complete the pseudocode.
The following pseudocode is executed using the **"Scores"** dataset. At the end of execution,
**cityD[k]** represent the dictionary with gender as key mapped to the lowest Physics marks scored
by that gender in city **k**. But the pseudocode may have mistakes, identify all such mistakes(if any).
Assume that all statements not listed in the options below are free of errors. It is a Multiple Select
Question (MSQ).
6406536002447.
Line 5: isKey(cityD, X.Town/City) should be written
6406536002448.
Line 15: cityD[X.Town/City] updated wrong value
6406536002449.
Line 16: cityD[X.Town/City][X.Gender] is not required
6406536002450.
No errors
A published solution is not available for this question yet.
**findSomething** is a procedure that accepts a non-empty list of distinct integers **L** as input and
finds the **largest integer** present in the input list.
Choose the correct code fragment to complete the pseudocode.
Consider the following pseudocode. At the end of the execution, if **flag** has the value **False**, then
choose the possible values of the list **L** from the given options.
6406536002455.
['z', 'y']
6406536002456.
['y', 'x', 'z']
6406536002457.
['x', 'y']
6406536002458.
['x', 'z', 'x']
A published solution is not available for this question yet.
Let **A** be a non-empty dictionary defined as:
**A** = { "p": [4, 8, 12, 16], "q": [3, 6, 9], "r": {"x":50, "y":75, "z":100}, "t": "hello" }
Choose the correct option(s). It is a Multiple Select Question (MSQ).
6406536002459.
The expression first(A["p"]) + last(A["q"]) evaluates to 13.
6406536002460.
The expression rest(A["p"]) returns [8, 12, 16].
6406536002461.
The expression length(keys(A)) returns 5.
6406536002462.
The expression init(A["q"]) returns [3, 6].
A published solution is not available for this question yet.
The following pseudocode is executed using the "Library" dataset. At the end of the execution, **A**
stores a dictionary with the author’s name as key and the number of books written by him/her as
its value. But the code may have mistakes. Identify all such mistakes (if any). Assume that all
statements not listed in the options below are free of errors.
6406536002463.
Replacing the condition given in line 4 with the statement given below will
provide the correct result.
6406536002464.
Replacing the statements given from line 4 to 9 with the statements given
below will provide the correct result.
6406536002465.
Interchanging Line 5 and 8 will provide the correct result.
6406536002466.
Replacing the statements given from line 4 to 9 with the statements given
below will provide the correct result.
A published solution is not available for this question yet.
A word is said to be a palindrome if it reads the same when reversed. For example, “madam” is a
palindrome. Let **X** be a row in the “Words” table. At the end of the execution of the following
pseudocode flag stores **True** if the word in row **X** is a palindrome and **False** otherwise.
**explode(word)** returns a list of letters present in the word. For example: explode("madam") = ['m',
'a', 'd', 'a', 'm'].
Select the correct implementation of the procedure **isPalindrome**. It is a Multiple Select Question
(MSQ).
Consider the following pseudocode **updateDict**. Let **Z** be a row in the **"Words"** table such that
**Z**.Word = "shuddered".
What will be the value of **alphaDict['d']** at the end of execution?
A published solution is not available for this question yet.
Consider the implementation of the following procedure **getDictionary**. Assume that the
procedure absolute takes an integer as parameter and returns the absolute value. For example,
**absolute(-2) = 2** and **absolute(3) = 3**.
Based on the above data, answer the given subquestions.
Let **D** be the value returned by **getDictionary**([5, 10, 20, 30, 20, 10, 20, 5, 15]). What is the value of
**D[20]** ?
A published solution is not available for this question yet.
Consider the implementation of the following procedure **getDictionary**. Assume that the
procedure absolute takes an integer as parameter and returns the absolute value. For example,
**absolute(-2) = 2** and **absolute(3) = 3**.
Based on the above data, answer the given subquestions.
Let **aList** be a list of integers and **D** be the dictionary returned by **getDictionary(aList)**. Which of
the following statements is/are true?
6406536002478.
**length(aList) == length(keys(D))**
6406536002479.
For each **a** in **aList**, **D[a] == a**
6406536002480.
If there exists **a** in **aList** such that **D[a] = a**, then **a** occurs more than once in
aList
6406536002481.
If **x** be the minimum element in **aList**, then **D[x] > x**
A published solution is not available for this question yet.
The following pseudocode is executing using the “Scores” table. The procedure **getAdjMatrix**
returns the adjacency matrix of a graph generated from the “Scores” table.
Based on the above data, answer the given subquestions.
If **matrixPh[i][j] = 1**, then
6406536002482.
**i** scored at most 10 and at least 20 more marks in Physics than **j**
6406536002483.
**i** scored at least 10 and at most 20 more marks in Physics than **j**
6406536002484.
**j** scored at least 10 and at most 20 more marks in Physics than **i**
6406536002485.
**j** scored at most 10 and at least 20 more marks in Physics than **i**
A published solution is not available for this question yet.
The following pseudocode is executing using the “Scores” table. The procedure **getAdjMatrix**
returns the adjacency matrix of a graph generated from the “Scores” table.
Based on the above data, answer the given subquestions.
Choose the correct statement based on the given pseudocode.
6406536002486.
For all i, j with i != j, matrixPh[i][j] + matrixPh[j][i] = 1
6406536002487.
For all i, j with i != j, if matrixPh[i][j] = 1 then matrixPh[j][i] = 0
6406536002488.
For all i, j with i != j, if matrixPh[i][j] = 0 then matrixPh[j][i] = 1
6406536002489.
For all i, j with i != j, if matrixPh[i][j] = 1 then matrixPh[j][i] = 1
A published solution is not available for this question yet.
The following pseudocode is executing using the “Scores” table. The procedure **getAdjMatrix**
returns the adjacency matrix of a graph generated from the “Scores” table.
Based on the above data, answer the given subquestions.
Consider the dictionary **D**, and the matrices **matrixPh**, **matrixCh** and **matrixMa** computed in the
previous question. The following pseudocode generate the adjacency matrix **matrixHelp**.
Let **i** and **j** be indices of two students. Choose the correct statement(s) from the given options. It is
a Multiple Select Question (MSQ)
6406536002490.
0 <= matrixHelp[i][j] <= 3
6406536002491.
matrixHelp[i][j] + matrixHelp[j][i] <= 3
6406536002492.
matrixHelp[i][j] != matrixHelp[j][i]
6406536002493.
if matrixHelp[i][j] = 3, then matrixHelp[j][i] = 0
A published solution is not available for this question yet.