uiz Space

May 2025 term · Computational Thinking · BSCS1001

Computational Thinking End Term: 31 August 2025, Set 6 (May 2025 term)

The IIT Madras BS Computational Thinking (Computational Thinking (CT)) End Term paper sat on 31 Aug 2025, in the May 2025 term, set 6: 25 questions for 105 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
25
Marks
105
Duration
180 min
MCQ
10
MSQ
7
Written
8

Updated

Official paper: IIT M IMPROVEMENT AN EXAM QIB4 31 Aug · No negative marking.

Question 1

+1 markOne correct option

THIS IS QUESTION PAPER FOR THE SUBJECT "FOUNDATION LEVEL : COMPUTATIONAL THINKING (COMPUTER BASED EXAM)" ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT? CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN. (IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)

  1. A

    YES

  2. B

    NO

Show answer

Correct answer

  • A

    YES

Question 2

+1 markOne correct option
Figure from the original question paper
Figure from the original question paper
  1. A

    Useful Data has been mentioned above.

  2. B

    This data attachment is just for a reference & not for an evaluation.

Show answer

Correct answer

  • A

    Useful Data has been mentioned above.

Question 3

+5 marksOne correct option
Figure from the original question paper
  1. A
    Figure from the original question paper
  2. B
    Figure from the original question paper
  3. C
    Figure from the original question paper
  4. D
    Figure from the original question paper
Show answer

Correct answer

  • B
    Figure from the original question paper

Question 4

+5 marksOne correct option
Figure from the original question paper
  1. A
    Figure from the original question paper
  2. B
    Figure from the original question paper
  3. C
    Figure from the original question paper
  4. D
    Figure from the original question paper
Show answer

Correct answer

  • C
    Figure from the original question paper

Question 5

+5 marksOne correct option
Figure from the original question paper
  1. A

    Number of students from the cities with the average total marks of the citygreater than the average total marks of the dataset.

  2. B

    Number of students from the cities with the average total marks of the cityless than the average total marks of the dataset.

  3. C

    Number of cities with the average total marks less than the average totalmarks of the dataset.

  4. D

    Number of cities with the average total marks more than the average totalmarks of the dataset

Show answer

Correct answer

  • B

    Number of students from the cities with the average total marks of the cityless than the average total marks of the dataset.

Question 6

+5 marksOne correct option
Figure from the original question paper
  1. A

    Dictionary with authors as keys mapped to the year of publication of theirlatest book

  2. B

    Dictionary with authors as keys mapped to the year of publication of their firstbook

  3. C

    Dictionary with authors as keys mapped to the year of publication of theirsecond book

  4. D

    Dictionary with authors as keys mapped to the year of publication of theirsecond latest book

Show answer

Correct answer

  • A

    Dictionary with authors as keys mapped to the year of publication of theirlatest book

Question 7

+5 marksOne correct option
Figure from the original question paper
  1. A

    Number of pairs of students with different gender or same Town/City

  2. B

    Number of pairs of students with same gender or different Town/City

  3. C

    Number of pairs of students with different gender and same Town/City

  4. D

    Number of pairs of students with same gender and different Town/City

Show answer

Correct answer

  • A

    Number of pairs of students with different gender or same Town/City

Question 8

+5 marksOne or more correct options
Figure from the original question paper

Select all that apply.

  1. A

    There are 5 cliques of size three present in the graph.

  2. B

    The nodes 0, 2, 3 and 4 form a clique of size four.

  3. C

    The maximum size of clique that appears in the graph is 3.

  4. D

    The nodes 1, 2 and 3 form a clique of size three.

Show answer

Correct answers

  • A

    There are 5 cliques of size three present in the graph.

  • B

    The nodes 0, 2, 3 and 4 form a clique of size four.

Question 9

+5 marksOne or more correct options
Figure from the original question paper

Select all that apply.

  1. A

    When L = [5, 8, 6, 1, 3], the output of findSomething1(L) is 8.

  2. B

    When L = [5, 8, 6, 1, 3], the output of findSomething1(L) is 1.

  3. C

    When L = [5, 8, 6, 1, 3], the output of findSomething2(L) is 8.

  4. D

    When L = [5, 8, 6, 1, 3], the output of findSomething2(L) is 1.

Show answer

Correct answers

  • A

    When L = [5, 8, 6, 1, 3], the output of findSomething1(L) is 8.

  • C

    When L = [5, 8, 6, 1, 3], the output of findSomething2(L) is 8.

Question 10

+5 marksOne correct option
Figure from the original question paper
  1. A

    The first element of both the lists, cumuList and aList, will be same.

  2. B

    Number of elements in cumuList will be one lesser than that of aList.

  3. C

    cumuList is a list of numbers in decreasing order.

  4. D

    Number of elements in both lists, cumuList and aList, will be different.

Show answer

Correct answer

  • C

    cumuList is a list of numbers in decreasing order.

Question 11

+5 marksOne or more correct options
Figure from the original question paper

Select all that apply.

  1. A

    N represents maximum number of bills issued to a single customer.

  2. B

    count represents number of customers.

  3. C

    At the end of the execution, the value of A will be 1.

  4. D

    N represents maximum number of bills issued to a single customer from thesame shop.

Show answer

Correct answers

  • A

    N represents maximum number of bills issued to a single customer.

  • B

    count represents number of customers.

  • C

    At the end of the execution, the value of A will be 1.

Question 12

+6 marksOne or more correct options
Figure from the original question paper

Select all that apply.

  1. A
    Figure from the original question paper
  2. B
    Figure from the original question paper
  3. C
    Figure from the original question paper
  4. D
    Figure from the original question paper
Show answer

Correct answers

  • A
    Figure from the original question paper
  • B
    Figure from the original question paper

Question 13

+5 marksWritten answer
Figure from the original question paper
Show answer

A written answer, not marked automatically.

Question 14

+5 marksWritten answer
Figure from the original question paper
Show answer

A written answer, not marked automatically.

Question 15

+5 marksWritten answer
Figure from the original question paper
Show answer

A written answer, not marked automatically.

Question 16

+4 marksWritten answer
Figure from the original question paper
Show answer

A written answer, not marked automatically.

Question 17

+5 marksOne or more correct options

Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being indexed from 0 to n − 1. There are M rows in the table. Each row contains information about a train that connects two stations without any stops in between.

Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being indexed from 0 to n − 1. There are M rows in the table. Each row contains information about a train that connects two stations without any stops in between. Row r, tells us that train t departs from station i and arrives at station j after covering a distance of d kilometers without stopping at any intermediate station. Therefore, each train t will occupy multiple rows in this table.
This scenario is modeled as a graph and is represented by a matrix A. Each node in the graph corresponds to a station. Assume that the value of n is already given to you. Consider the following pseudocode.

Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being indexed from 0 to n − 1. There are M rows in the table. Each row contains information about a train that connects two stations without any stops in between. Row r, tells us that train t departs from station i and arrives at station j after covering a distance of d kilometers without stopping at any intermediate station. Therefore, each train t will occupy multiple rows in this table.
This scenario is modeled as a graph and is represented by a matrix A. Each node in the graph corresponds to a station. Assume that the value of n is already given to you. Consider the following pseudocode. Based on the above data, answer the given subquestions.

Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being i
Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being i

If (i, j) is a pair of stations, which of the following statements about the dictionary A[i][j] are true?

Select all that apply.

  1. A

    Each key corresponds to a train that goes from station i to j without stoppingat any intermediate station.

  2. B

    Each key corresponds to a train that goes from station i to j. It may stop atmultiple stations between i and j.

  3. C

    The value corresponding to key t of the dictionary is the distance betweenstations i and j on t’s route.

  4. D

    The value corresponding to key t of the dictionary is the minimum distancebetween stations i and j on t’s route.

Show answer

Correct answers

  • A

    Each key corresponds to a train that goes from station i to j without stoppingat any intermediate station.

  • C

    The value corresponding to key t of the dictionary is the distance betweenstations i and j on t’s route.

Question 18

+6 marksOne or more correct options

Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being indexed from 0 to n − 1. There are M rows in the table. Each row contains information about a train that connects two stations without any stops in between.

Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being indexed from 0 to n − 1. There are M rows in the table. Each row contains information about a train that connects two stations without any stops in between. Row r, tells us that train t departs from station i and arrives at station j after covering a distance of d kilometers without stopping at any intermediate station. Therefore, each train t will occupy multiple rows in this table.
This scenario is modeled as a graph and is represented by a matrix A. Each node in the graph corresponds to a station. Assume that the value of n is already given to you. Consider the following pseudocode.

Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being indexed from 0 to n − 1. There are M rows in the table. Each row contains information about a train that connects two stations without any stops in between. Row r, tells us that train t departs from station i and arrives at station j after covering a distance of d kilometers without stopping at any intermediate station. Therefore, each train t will occupy multiple rows in this table.
This scenario is modeled as a graph and is represented by a matrix A. Each node in the graph corresponds to a station. Assume that the value of n is already given to you. Consider the following pseudocode. Based on the above data, answer the given subquestions.

Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being i
Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being i

ijMin is a procedure that accepts a pair of stations (i, j), and the matrix A as input. It returns a train which goes from i to j by covering the least distance, without stopping at any intermediate station. If there is no train connecting these two stations, the procedure returns -1. The pseudocode may have mistakes. Identify all of them (if any).

ijMin is a procedure that accepts a pair of stations (i, j), and the matrix A as input. It returns a train which goes from i to j by covering the least distance, without stopping at any intermediate station. If there is no train connecting these two stations, the procedure returns -1. The pseudocode may have mistakes. Identify all of them (if any).

ijMin is a procedure that accepts a pair of stations (i, j), and the matrix A as input. It returns a train which goes fr

Select all that apply.

  1. A

    Error in line 3

  2. B

    Error in line 5

  3. C

    Error in line 7

  4. D

    Error in line 9

Show answer

Correct answers

  • C

    Error in line 7

  • D

    Error in line 9

Question 19

+5 marksOne or more correct options

Let M be an adjacency matrix of a graph G given below, where M[i][j] = 1 if there is an edge from i to j, otherwise 0. ListV represents the list of vertices of the graph G.

Let M be an adjacency matrix of a graph G given below, where M[i][j] = 1 if there is an edge from i to j, otherwise 0. ListV represents the list of vertices of the graph G.

Based on the above data, answer the given subquestions.

Let M be an adjacency matrix of a graph G given below, where M[i][j] = 1 if there is an edge from i
to j, otherwise 0. L
Figure from the original question paper

Select all that apply.

  1. A

    newMatrix [2] [4] = 1

  2. B

    newMatrix [1] [1] = 0

  3. C

    newMatrix [3] [0] = 1

  4. D

    newMatrix [1] [3] = 0

Show answer

Correct answers

  • A

    newMatrix [2] [4] = 1

  • C

    newMatrix [3] [0] = 1

Question 20

+5 marksOne correct option

Let M be an adjacency matrix of a graph G given below, where M[i][j] = 1 if there is an edge from i to j, otherwise 0. ListV represents the list of vertices of the graph G.

Let M be an adjacency matrix of a graph G given below, where M[i][j] = 1 if there is an edge from i to j, otherwise 0. ListV represents the list of vertices of the graph G.

Based on the above data, answer the given subquestions.

Let M be an adjacency matrix of a graph G given below, where M[i][j] = 1 if there is an edge from i
to j, otherwise 0. L
Figure from the original question paper
  1. A

    3

  2. B

    5

  3. C

    6

  4. D

    9

Show answer

Correct answer

  • C

    6

Question 21

+5 marksOne correct option

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.

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. Let D be the value returned by getDictionary([5, 10, 20, 30, 20, 10, 20, 5, 15]). Answer the given subquestions based on D.

Consider the implementation of the following procedure getDictionary.
Assume that the procedure absolute takes an intege

What is the value of D[20] ?

  1. A

    7

  2. B

    10

  3. C

    30

  4. D

    20

Show answer

Correct answer

  • D

    20

Question 22

+4 marksWritten answer

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.

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. Let D be the value returned by getDictionary([5, 10, 20, 30, 20, 10, 20, 5, 15]). Answer the given subquestions based on D.

Consider the implementation of the following procedure getDictionary.
Assume that the procedure absolute takes an intege

What is the value of length(keys(D)) ?

Show answer

A written answer, not marked automatically.

Question 23

+1 markWritten answer

Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being indexed from 0 to n − 1. There are M rows in the table. Each row contains information about a train that connects two stations without any stops in between.

Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being indexed from 0 to n − 1. There are M rows in the table. Each row contains information about a train that connects two stations without any stops in between. Row r, tells us that train t departs from station i and arrives at station j after covering a distance of d kilometers without stopping at any intermediate station. Therefore, each train t will occupy multiple rows in this table.
This scenario is modeled as a graph and is represented by a matrix A. Each node in the graph corresponds to a station. Assume that the value of n is already given to you. Consider the following pseudocode.

Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being indexed from 0 to n − 1. There are M rows in the table. Each row contains information about a train that connects two stations without any stops in between. Row r, tells us that train t departs from station i and arrives at station j after covering a distance of d kilometers without stopping at any intermediate station. Therefore, each train t will occupy multiple rows in this table.
This scenario is modeled as a graph and is represented by a matrix A. Each node in the graph corresponds to a station. Assume that the value of n is already given to you. Consider the following pseudocode. Based on the above data, answer the given subquestions.

Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being i
Consider the following condensed version of the “Trains” dataset. There are a total of n stations, with stations being i
Show answer

A written answer, not marked automatically.

Question 24

+1 markWritten answer

Let M be an adjacency matrix of a graph G given below, where M[i][j] = 1 if there is an edge from i to j, otherwise 0. ListV represents the list of vertices of the graph G.

Let M be an adjacency matrix of a graph G given below, where M[i][j] = 1 if there is an edge from i to j, otherwise 0. ListV represents the list of vertices of the graph G.

Based on the above data, answer the given subquestions.

Let M be an adjacency matrix of a graph G given below, where M[i][j] = 1 if there is an edge from i
to j, otherwise 0. L
Show answer

A written answer, not marked automatically.

Question 25

+1 markWritten answer

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.

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. Let D be the value returned by getDictionary([5, 10, 20, 30, 20, 10, 20, 5, 15]). Answer the given subquestions based on D.

Consider the implementation of the following procedure getDictionary.
Assume that the procedure absolute takes an intege
Show answer

A written answer, not marked automatically.