Prasnya
Prasnya
Prasnya
Continue with Google
Prasnya
Continue with Google
Week 2 Computational Thinking Questions | Prasnya
Computational Thinking > Week 2
All PYQs
Topic-Wise PYQs
Start Weekly Test
Mock tests
Week mock
Topic mock
Subject mock
Type:
All
Difficulty:
All
Year:
All
8Q
01
The following pseudocode is executed using the "Scores" dataset. What will the values of `A` and `B` represent at the end of the execution? ``` D = {} while(Table 1 has more rows) { Read the first row X in Table 1 if(isKey(D, X.Town/City)) { if(D[X.Town/City] > X.Physics) { D[X.Town/City] = X.Physics } } else { D[X.Town/City] = X.Physics } Move X to Table 2 } A = 0, B = 100 foreach Y in keys(D) { if(B == D[Y]) { A = A + 1 } if(B > D[Y]) { A = 1 B = D[Y] } } ```
Single correct
HARD
5 marks
03 August 2025
02
What will `B` represent at the end of the execution?
Comprehension
EASY
4 marks
16 March 2025
03
The following pseudocode is executed on the Words dataset. Which of the following statements is/are true at the end of the execution? ``` A = [] B = [] while(Table 1 has more rows) { Read the top row X from Table 1 if(X.LetterCount < 5) { A = A ++ [X.SerialNumber] if(X.PartOfSpeech == "Noun") { B = B ++ [X.SerialNumber] } } } ```
Multiple correct
MEDIUM
4 marks
01 December 2024
04
Based on the comprehension context above, what will `count` represent at the end of execution if the missing code is filled by the code below? ``` if(X.Word ends with full stop) { if(X.PartOfSpeech != "Noun") { count = count + 1 } } ```
Comprehension
EASY
3 marks
01 December 2024
05
Based on the comprehension context above, what will `count` represent at the end of execution if the missing code is filled by the code below? ``` if(flag and X.PartOfSpeech != "Verb") { count = count + 1 } flag = False if(X.Word ends with full stop) { flag = True } ```
Comprehension
MEDIUM
4 marks
01 December 2024
06
The following pseudocode is executed on the Words table. Assume rows in Table 1 are sorted in increasing sequence number. What does list `L` contain at the end of execution? ``` L = [] A = "None" Read the first row X in Table 1 A = X.PartOfSpeech Move X to Table 2 while (Table 1 has more rows) { Read the first row X in Table 1 if (X.PartOfSpeech == "Noun") { if (A == "Article") { L = L ++ [X.Word] } } A = X.PartOfSpeech Move X to Table 2 } ```
Single correct
EASY
3 marks
24 March 2024
07
The following pseudocode is executed using the Words dataset. What will the values of `A` and `B` represent at the end of execution? ``` A = [] B = [] while (Table 1 has more rows) { Read the top row X from Table 1 if (X.PartOfSpeech == "Verb") { A = A ++ [X.SerialNumber] if (X.LetterCount > 5) { B = B ++ [X.SerialNumber] } } Move X to Table 2 } ```
Single correct
EASY
3 marks
03 December 2023
08
The given pseudocode based on the Scores dataset has 30 cards. All 30 cards do not have the same city. What does `countT` represent at the end of execution? ``` count = 0 countT = 0 sumT = 0 averageT = 0 while (Table 1 has more rows) { Read the first row X in Table 1 Move X to Table 2 if (X.CityTown == "Vellore") { count = count + 1 } else { sumT = sumT + X.Total } } Restore cards to Table 1 if (count < 30) { averageT = sumT / (30 - count) } while (Table 1 has more rows) { Read the first row X in Table 1 Move X to Table 2 if (X.Total > averageT) { countT = countT + 1 } } ```
Single correct
MEDIUM
4 marks
03 December 2023
Showing 8 questions.
Computational Thinking > Week 2
All PYQs
Topic-Wise PYQs
Start Weekly Test
Mock tests
Week mock
Topic mock
Subject mock
Type:
All
Difficulty:
All
Year:
All
8Q
01
The following pseudocode is executed using the "Scores" dataset. What will the values of `A` and `B` represent at the end of the execution? ``` D = {} while(Table 1 has more rows) { Read the first row X in Table 1 if(isKey(D, X.Town/City)) { if(D[X.Town/City] > X.Physics) { D[X.Town/City] = X.Physics } } else { D[X.Town/City] = X.Physics } Move X to Table 2 } A = 0, B = 100 foreach Y in keys(D) { if(B == D[Y]) { A = A + 1 } if(B > D[Y]) { A = 1 B = D[Y] } } ```
Single correct
HARD
5 marks
03 August 2025
02
What will `B` represent at the end of the execution?
Comprehension
EASY
4 marks
16 March 2025
03
The following pseudocode is executed on the Words dataset. Which of the following statements is/are true at the end of the execution? ``` A = [] B = [] while(Table 1 has more rows) { Read the top row X from Table 1 if(X.LetterCount < 5) { A = A ++ [X.SerialNumber] if(X.PartOfSpeech == "Noun") { B = B ++ [X.SerialNumber] } } } ```
Multiple correct
MEDIUM
4 marks
01 December 2024
04
Based on the comprehension context above, what will `count` represent at the end of execution if the missing code is filled by the code below? ``` if(X.Word ends with full stop) { if(X.PartOfSpeech != "Noun") { count = count + 1 } } ```
Comprehension
EASY
3 marks
01 December 2024
05
Based on the comprehension context above, what will `count` represent at the end of execution if the missing code is filled by the code below? ``` if(flag and X.PartOfSpeech != "Verb") { count = count + 1 } flag = False if(X.Word ends with full stop) { flag = True } ```
Comprehension
MEDIUM
4 marks
01 December 2024
06
The following pseudocode is executed on the Words table. Assume rows in Table 1 are sorted in increasing sequence number. What does list `L` contain at the end of execution? ``` L = [] A = "None" Read the first row X in Table 1 A = X.PartOfSpeech Move X to Table 2 while (Table 1 has more rows) { Read the first row X in Table 1 if (X.PartOfSpeech == "Noun") { if (A == "Article") { L = L ++ [X.Word] } } A = X.PartOfSpeech Move X to Table 2 } ```
Single correct
EASY
3 marks
24 March 2024
07
The following pseudocode is executed using the Words dataset. What will the values of `A` and `B` represent at the end of execution? ``` A = [] B = [] while (Table 1 has more rows) { Read the top row X from Table 1 if (X.PartOfSpeech == "Verb") { A = A ++ [X.SerialNumber] if (X.LetterCount > 5) { B = B ++ [X.SerialNumber] } } Move X to Table 2 } ```
Single correct
EASY
3 marks
03 December 2023
08
The given pseudocode based on the Scores dataset has 30 cards. All 30 cards do not have the same city. What does `countT` represent at the end of execution? ``` count = 0 countT = 0 sumT = 0 averageT = 0 while (Table 1 has more rows) { Read the first row X in Table 1 Move X to Table 2 if (X.CityTown == "Vellore") { count = count + 1 } else { sumT = sumT + X.Total } } Restore cards to Table 1 if (count < 30) { averageT = sumT / (30 - count) } while (Table 1 has more rows) { Read the first row X in Table 1 Move X to Table 2 if (X.Total > averageT) { countT = countT + 1 } } ```
Single correct
MEDIUM
4 marks
03 December 2023
Showing 8 questions.