uiz Space

January 2025 term · Computational Thinking · BSCS1001

Computational Thinking Qualifier: 13 April 2025 (January 2025 term)

The IIT Madras BS Computational Thinking (Computational Thinking (CT)) Qualifier paper sat on 13 Apr 2025, in the January 2025 term: 12 questions for 50 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
12
Marks
50
Duration
120 min
MCQ
9
MSQ
2
Numerical
1

Updated

Official paper: IIT M DS REATTEMPT AN EXAM QDQ1 13 Apr 2025 · No negative marking.

Question 1

+4 marksOne correct option

Statement

The following pseudocode is executed using the “Library” dataset. What will A represent at the end of execution?

text
A = 0
count = 0
while(Table 1 has more rows){
Read the first row X in Table 1
count = count + 1
if(X.Author != “Kalam” and X.Language != “English”){
A = A + 1
}
Move X to Table 2
}
A = count - A
  1. A

    Number of books written by author Kalam in English

  2. B

    Number of books not written by author Kalam in English

  3. C

    Number of English books written by authors other than Kalam

  4. D

    Number of books that are written by Kalam or in English or both

Show answer

Correct answer

  • D

    Number of books that are written by Kalam or in English or both

Question 2

+4 marksOne correct option

The following pseudocode is executed using the "Scores" table. What will A represent at the end of the execution?

text
A = 0
while(Table 1 has more rows){
Read the first row X in Table 1
B = True
if(X.Physics > 60){
B = False
}
if(X.Chemistry > 60){
B = False
}
if(X.Mathematics > 60){
B = False
}
if(B){
A = A + 1
}
Move X to Table 2
}
  1. A

    Number of students with some subject marks less than 60

  2. B

    Number of students with some subject marks at most 60

  3. C

    Number of students with all subject marks less than 60

  4. D

    Number of students with all subject marks at most 60

Show answer

Correct answer

  • D

    Number of students with all subject marks at most 60

Question 3

+4 marksOne correct option

The following pseudocode is executed using the "Words" dataset. At the end of the execution, A captures the maximum letter count of a word which is not noun. Choose the correct code fragment to complete the pseudocode.

text
A = 0
while(Table 1 has more rows){
Read the first row X in Table 1
********************
* Fill the code *
********************
Move X to Table 2
}
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 4

+4 marksOne correct option

Let X be a row in the "Words" dataset. Let isShortVerb be a procedure to find whether the word in the row X is a verb with letter count at most five. Choose the correct code fragment to complete the pseudocode.

text
Procedure isShortVerb(X)
********************
* Fill the code *
********************
End isShortVerb
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 5

+4 marksOne correct option

Statement

The following pseudocode is executed using the "Scores" dataset. At the end of the execution of below pseudocode, if count2 represents the number of male students whose Physics marks are less than or equal to Mathematics marks, then select the correct code fragment for A and B.

text
count1 = 0, count2 = 0
while(Table 1 has more rows){
Read the first row X in Table 1
if(....A.... or ....B....){
count1 = count1 + 1
}
else{
count2 = count2 + 1
}
Move X to Table 2
}
  1. A

    A: X.Gender == 'F'
    B: X.Mathematics > X.Physics

  2. B

    A: X.Gender == 'M'
    B: X.Mathematics < X.Physics

  3. C

    A: X.Gender == 'F'
    B: X.Mathematics < X.Physics

  4. D

    A: X.Gender == 'M'
    B: X.Mathematics > X.Physics

Show answer

Correct answer

  • C

    A: X.Gender == 'F'
    B: X.Mathematics < X.Physics

Question 6

+4 marksOne correct option

Statement

The following pseudocode is executed using the “Words” dataset. The variable count counts the words with part of speech noun or letter count at least 5, but not both. Choose the correct code fragment to complete the pseudocode.

text
count = 0
while(Table 1 has more rows){
Read the first row X in Table 1
if(checkSomething(X)){
count = count + 1
}
Move X to Table 2
}
Procedure checkSomething(Y)
A = False, B = False
if(X.PartOfSpeech == "Noun"){
A = True
}
if(X.LetterCount >= 5){
B = True
}
**********************
*** Fill the code ***
**********************
End checkSomething
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • D

Question 7

+4 marksOne correct option

Statement

The given pseudocode is executed using the "Scores" dataset. There is a hypothesis that if a student performs well overall (i.e., scores at least total 180 marks), then he/she must have performed well in all the subjects (i.e., scored at least 60 marks in each subject). At the end of execution, fracTrue stores the fraction of students who satisfy this hypothesis. Choose the correct code fragment to complete the pseudocode.

text
countOverall = 0, countPerSub = 0
while(Table 1 has more rows){
Read the first row X in Table 1
if(X.Total >= 180) {
********************
* Fill the code *
********************
}
Move X to Table 2
}
fracTrue = countPerSub / countOverall
  1. A
  2. B
  3. C
  4. D
  5. E
Show answer

Correct answer

  • B

Question 8

+5 marksOne or more correct options

Statement

The following pseudocode is executed using the “Scores” dataset. At the end of the execution, A captures the lowest Chemistry marks scored by a male student from Vellore. Choose the correct code fragment(s) to complete the pseudocode.

text
A = 101
while (Table 1 has more rows) {
Read the first row X in Table 1
********************
* Fill the code *
********************
Move X to Table 2
}

Select all that apply.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answers

  • B
  • D

Question 9

+5 marksOne or more correct options

Statement

The given information represents a "Words" dataset and it may have some mistakes with respect to the sanity of data. Identify all rows with such mistakes. It is a Multiple Select Question (MSQ).

Row no.FieldValue
Row 1Card number"xyz"
Row 2Word1
Row 3Part of Speech"Noun"
Row 4Letter Count- 5

Select all that apply.

  1. A

    Row 1: Incorrect data type of card number

  2. B

    Row 2: Incorrect data type of Word

  3. C

    Row 3: Incorrect data type of Part of Speech

  4. D

    Row 3: Invalid value of Part of Speech

  5. E

    Row 4: Incorrect data type of Letter Count

  6. F

    Row 4: Invalid value of Letter Count

Show answer

Correct answers

  • A

    Row 1: Incorrect data type of card number

  • B

    Row 2: Incorrect data type of Word

  • F

    Row 4: Invalid value of Letter Count

Question 10

+4 marksNumerical answer

Statement

The following pseudocode is executed using a dataset similar to the "Words" dataset, based on the following paragraph.

"Surrounded by nature, Susan often takes a stroll, savoring the soothing sounds of chirping birds. Such moments underline the significance of embracing simple joys in life. Rustlings in the trees suggest squirrels beginning their day, searching for sustenance. Surely, the beauty of a sunrise holds unparalleled magic."

text
count = 0, flag = True
while(Table 1 has more rows){
Read the first row X in Table 1
Move X to Table 2
if(flag){
if(1st letter of X.Word == 's'){
if(2nd letter of X.Word == 'u'){
count = count + 1
}
}
}
flag = False
if(X.Word ends with full stop){
flag = True
}
}

What would be the value of count at the end of the execution of the above pseudocode? Assume that upper case and lower case are ignored during comparison of letters.

Show answer

Correct answer: 3

Question 11

+4 marksOne correct option

Statement
The following pseudocode is executed using the “Scores” dataset

text
1 A = 0, B = 0
2 while(Table 1 has more rows){
3 Read the first row X in Table 1
4 Flag = False
5 if(X.Gender == 'M' or X.Physics > 90){
6 Flag = True
7 }
8 if(not Flag){
9 A = A + 1
10 if(X.Total > 200){
11 B = B + 1
12 }
13 }
14 Move X to Table 2
15 }

Based on the above data, answer the given subquestions.

What will A represent at the end of the execution?

  1. A

    Number of students whose Physics marks are at most 90

  2. B

    Number of female students whose Physics marks are at least 90

  3. C

    Number of female students whose Physics marks are at most 90

  4. D

    Number of male students whose Physics marks are at most 90

Show answer

Correct answer

  • C

    Number of female students whose Physics marks are at most 90

Question 12

+4 marksOne correct option

Statement
The following pseudocode is executed using the “Scores” dataset

text
1 A = 0, B = 0
2 while(Table 1 has more rows){
3 Read the first row X in Table 1
4 Flag = False
5 if(X.Gender == 'M' or X.Physics > 90){
6 Flag = True
7 }
8 if(not Flag){
9 A = A + 1
10 if(X.Total > 200){
11 B = B + 1
12 }
13 }
14 Move X to Table 2
15 }

Based on the above data, answer the given subquestions.

What will B represent at the end of the execution?

  1. A

    Number of students whose Physics marks are at most 90 and total marks greater than 200.

  2. B

    Number of students whose Physics marks are at least 90 and total marks greater than 200.

  3. C

    Number of female students whose Physics marks are at least 90 and total marks greater than 200.

  4. D

    Number of female students whose Physics marks are at most 90 and total marks greater than 200.

Show answer

Correct answer

  • D

    Number of female students whose Physics marks are at most 90 and total marks greater than 200.