MauryaHub PYQ Practice

Computational Thinking · End Term · Sep 2025 · FN

Computational Thinking · End Term · Sep 2025 FN

← Course papers · Start practice / exam

Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.

0 / 21 published solutions

Question 2 MCQ · 0.0 marks

Source diagram or notation
6406536002421.
Useful Data has been mentioned above.
6406536002422.
This data attachment is just for a reference & not for an evaluation.

A published solution is not available for this question yet.

Report a correction for Q2

Question 3 MCQ · 5.0 marks

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.
Source diagram or notation
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.

Report a correction for Q3

Question 4 MCQ · 5.0 marks

The following pseudocode is executed using the "Scores" table. What will the values of **A** and **B** represent at the end of the execution?
Source diagram or notation
6406536002427.
**A** = Number of cities where students have scored the highest marks in Mathematics **B**= The highest marks in Mathematics
6406536002428.
**A**= Number of cities where students have scored the lowest marks in Mathematics **B** = The highest marks in Mathematics
6406536002429.
**A** = Cities where students have scored the lowest marks in Mathematics **B** = The lowest marks in Mathematics
6406536002430.
**A** = Number of cities with the highest Mathematics scores **B** = The lowest marks in Mathematics

A published solution is not available for this question yet.

Report a correction for Q4

Question 5 MCQ · 5.0 marks

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.
Source diagram or notation
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.

Report a correction for Q5

Question 6 MCQ · 5.0 marks

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.
Source diagram or notation
6406536002435.Source diagram or notation
6406536002436.Source diagram or notation
6406536002437.Source diagram or notation
6406536002438.
CAN AUnUERWNR BRR wnNRO B=0 if(x.chemistry == y.chemistry){ B=B+1 t if(x.mathematics == Y.Mathematics){ B=B+1 t if(x.Physics == Y.Physics){ B=B+1 t if(e == 1){ A=A+1

A published solution is not available for this question yet.

Report a correction for Q6

Question 7 MCQ · 5.0 marks

Consider the following graph with six nodes. A is a 6 × 6 matrix corresponding to this graph. Assume that it has already been computed:
Source diagram or notation
In the following pseudocode: **graph** is a matrix **parents** is a dictionary **sequence** is a list
Source diagram or notation
What will be the value of **S** after executing the following pseudocode?
Source diagram or notation
6406536002439.
[0, 1, 2, 5, 3, 4]
6406536002440.
[0, 1, 2, 3, 4, 5]
6406536002441.
[0, 1, 2, 3, 5, 4]
6406536002442.
[0, 2, 1, 3, 4, 5]

A published solution is not available for this question yet.

Report a correction for Q7

Question 8 MCQ · 5.0 marks

Let **M** be the adjacency matrix of the graph **G** as shown below and consider the procedure **Dosomething** given below.
Source diagram or notation
Source diagram or notation
What will the value of **B1** and **B2** be at the end of the execution of the pseudocode?
Source diagram or notation
6406536002443.
B1 = 2, B2 = 0
6406536002444.
B1 = 0, B2 = 2
6406536002445.
B1 = 1, B2 = 0
6406536002446.
B1 = 0, B2 = 1

A published solution is not available for this question yet.

Report a correction for Q8

Question 9 MSQ · 5.0 marks

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).
Source diagram or notation
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.

Report a correction for Q9

Question 10 MSQ · 5.0 marks

**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.
Source diagram or notation
6406536002451.Source diagram or notation
6406536002452.Source diagram or notation
6406536002453.Source diagram or notation
6406536002454.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q10

Question 11 MSQ · 5.0 marks

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.
Source diagram or notation
6406536002455.
['z', 'y']
6406536002456.
['y', 'x', 'z']
6406536002457.
['x', 'y']
6406536002458.
['x', 'z', 'x']

A published solution is not available for this question yet.

Report a correction for Q11

Question 12 MSQ · 5.0 marks

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.

Report a correction for Q12

Question 13 MSQ · 5.0 marks

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.
Source diagram or notation
6406536002463.
Replacing the condition given in line 4 with the statement given below will provide the correct result.
Source diagram or notation
6406536002464.
Replacing the statements given from line 4 to 9 with the statements given below will provide the correct result.
Source diagram or notation
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.
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q13

Question 14 MSQ · 5.0 marks

The following pseudocode is executed using the “Shopping Bills” dataset. Assume each customer has distinct name.
Source diagram or notation
Which of the following statements is/are true at the end of the execution?
6406536002467.
**N** represents the maximum number of bills issued to a single customer.
6406536002468.
**count** represents the number of customers.
6406536002469.
**A** represents the maximum number of bills issued to a single customer.
6406536002470.
**N** represents the maximum number of bills issued to a single customer from the same shop.

A published solution is not available for this question yet.

Report a correction for Q14

Question 15 MSQ · 5.0 marks

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).
Source diagram or notation
6406536002471.Source diagram or notation
6406536002472.Source diagram or notation
6406536002473.Source diagram or notation
6406536002474.Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q15

Question 16 NAT · 5.0 marks

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?
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q16

Question 17 NAT · 5.0 marks

What will be the value of **R** after executing the following pseudocode?
Source diagram or notation

A published solution is not available for this question yet.

Report a correction for Q17

Question 18 NAT · 5.0 marks

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**.
Source diagram or notation
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.

Report a correction for Q18

Question 19 MCQ · 5.0 marks

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**.
Source diagram or notation
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.

Report a correction for Q19

Question 20 MCQ · 5.0 marks

The following pseudocode is executing using the “Scores” table. The procedure **getAdjMatrix** returns the adjacency matrix of a graph generated from the “Scores” table.
Source diagram or notation
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.

Report a correction for Q20

Question 21 MCQ · 5.0 marks

The following pseudocode is executing using the “Scores” table. The procedure **getAdjMatrix** returns the adjacency matrix of a graph generated from the “Scores” table.
Source diagram or notation
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.

Report a correction for Q21

Question 22 MSQ · 5.0 marks

The following pseudocode is executing using the “Scores” table. The procedure **getAdjMatrix** returns the adjacency matrix of a graph generated from the “Scores” table.
Source diagram or notation
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**.
Source diagram or notation
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.

Report a correction for Q22