Quiz Space

September 2022 term · Computational Thinking · BSCS1001

Computational Thinking (CT) End Term: 11 December 2022, Set 1 (September 2022 term)

The IIT Madras BS Computational Thinking (Computational Thinking (CT)) End Term paper sat on 11 Dec 2022, in the September 2022 term, set 1: 43 questions for 111 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
43
Marks
111
Duration
180 min
MCQ
28
MSQ
4
Written
11

Updated

Official paper: IIT M FOUNDATION FN2 EXAM ETF2 11 Dec 2022 · No negative marking.

Question 1

+1 markOne correct option

THIS IS QUESTION PAPER FOR THE SUBJECT "FOUNDATION LEVEL: SEMESTER 1: COMPUTATIONAL THINKING" ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT? CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECT 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

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

    Number of pairs of students with the same gender

  2. B

    Number of pairs of students with the same TownCity

  3. C

    Number of pairs of students with the same gender and the same TownCity

  4. D

    Number of pairs of students with the same TownCity but different genders

Show answer

Correct answer

  • D

    Number of pairs of students with the same TownCity but different genders

Question 4

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

    X and Y is said to be a fair pair if X has more marks than Y in Physics and Y hasmore marks than X in Mathematics

  2. B

    X and Y is said to be a fair pair if X has more marks than Y in Mathematics andY has more marks than X in Physics

  3. C

    X and Y is said to be a fair pair if X has more marks than Y in at least onesubject and Y has more marks than X in at least one subject

  4. D

    X and Y is said to be a fair pair if X has more marks than Y in Physics andMathematics or Y has more marks than X in Physics and Mathematics

Show answer

Correct answer

  • D

    X and Y is said to be a fair pair if X has more marks than Y in Physics andMathematics or Y has more marks than X in Physics and Mathematics

Question 5

+4 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

  • D
    Figure from the original question paper

Question 6

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

    Number of maximum frequency words with letter count less than averageletter count

  2. B

    Number of maximum frequency words with letter count greater than averageletter count

  3. C

    Number of minimum frequency words with letter count less than averageletter count

  4. D

    Number of minimum frequency words with letter count greater than averageletter count

Show answer

Correct answer

  • B

    Number of maximum frequency words with letter count greater than averageletter count

Question 7

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

    L = [4, 0, 2, 1, 3, 5]

  2. B

    L = [4, 1, 0, 2, 3, 5]

  3. C

    L = [4, 3, 2, 0, 1, 5]

  4. D

    L = [4, 1, 2, 3, 0, 5]

Show answer

Correct answer

  • B

    L = [4, 1, 0, 2, 3, 5]

Question 8

+3 marksOne or more correct options

Let D be a dictionary whose keys are strings and values are integers. For each key A in D, D[A] is the letter count of A. Choose the correct statement(s) about dictionary D. It is a Multiple Select Question (MSQ).

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

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

Question 9

+3 marksOne or more correct options

Let D be a dictionary. Choose the correct statement(s) about the dictionary D. It is a Multiple Select Question (MSQ).

Select all that apply.

  1. A

    For each key X in D, D[X] is a distinct value

  2. B

    keys(D) has no duplicate elements

  3. C

    All the keys of D must be of the same datatype

  4. D

    We can obtain the key from the value of the key stored in D

  5. E

    The values of D can be of different datatypes

Show answer

Correct answers

  • B

    keys(D) has no duplicate elements

  • E

    The values of D can be of different datatypes

Question 10

+1 markOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

length(LB) == length(LA)

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 11

+1 markOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

At the end of the execution, LC == [1 ]

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 12

+1 markOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

Each element of LB is a list of different length

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 13

+1 markOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

last(LB) == LA

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 14

+1 markOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

Only one of element of LB is an empty list

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 15

+3 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

What will the value of X represent at the end of the execution?

  1. A

    The highest number among all the elements of listL

  2. B

    The smallest number among all the elements of listL

  3. C

    The highest number among intA and all the elements of listL

  4. D

    The smallest number among intA and all the elements of listL

Show answer

Correct answer

  • D

    The smallest number among intA and all the elements of listL

Question 16

+3 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

How many times will the procedure calculate be called, excluding the initial call in line 1?

  1. A

    length(listL)

  2. B

    length(listL) - 1

  3. C

    length(listL) + 1

  4. D

    Depends on the elements in listL

  5. E

    Depends on the value of A

Show answer

Correct answer

  • A

    length(listL)

Question 17

+4 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

What will outList represent at the end of the execution?

  1. A

    List of lists(pairs) of first and second word of each sentence

  2. B

    List of lists(pairs) of second and first word of each sentence

  3. C

    List of lists (pairs) of last and first word of each sentence

  4. D

    List of lists (pairs) of first and last word of each sentence

Show answer

Correct answer

  • D

    List of lists (pairs) of first and last word of each sentence

Question 18

+3 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

The values of length(outList) and A will be same at the end of the execution.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 19

+4 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

There may be multiple pairs having the same maximum distance. If we wish to find the pair that is closest to the first station in the list, which of the following is the correct code fragment?

  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 20

+3 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

There may be multiple pairs having the same maximum distance. If we wish to find a pair of stations closest to the last station in the list, which of the following is the correct code fragment?

  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

  • D
    Figure from the original question paper

Question 21

+2 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

Which of the following statements about the variable flag1 is True at the end of the execution of the given pseudocode?

  1. A

    It is True if and only if stn is a starting or ending station for at least one train inthe list

  2. B

    It is False if and only if stn is a starting or ending station for at least one trainin the list

  3. C

    It is True if and only if stn is a stating station for one train and ending stationfor some other train in the list

  4. D

    It is False if and only if stn is a starting station for one train and ending stationfor some other train in the list

Show answer

Correct answer

  • A

    It is True if and only if stn is a starting or ending station for at least one train inthe list

Question 22

+2 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

What will the variable count represent at the end of the execution of the given pseudocode?

  1. A

    It is number of trains associated with stn

  2. B

    It is the number of trains for which stn is a starting station

  3. C

    It is the number of trains for which stn is an ending station

  4. D

    It is the number of trains for which stn is neither a starting nor an endingstation

Show answer

Correct answer

  • D

    It is the number of trains for which stn is neither a starting nor an endingstation

Question 23

+3 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

At the end of the execution of the code given, what can be said about the values stored by the Boolean variables flag1 and flag2?

  1. A

    flag1 and flag2 always store the same value

  2. B

    flag1 and flag2 always store opposite values

  3. C

    flag1 always stores the value True

  4. D

    flag2 always stores the value True

  5. E

    There is no relationship between these two variables

Show answer

Correct answer

  • A

    flag1 and flag2 always store the same value

Question 24

+3 marksOne correct option

Study the pseudocode given above and answer the given subquestions.

Study the pseudocode given above and answer the given subquestions.
Figure from the original question paper
  1. A

    either they are from different city/town or have the same gender

  2. B

    either they are from the same city/town or have the same gender

  3. C

    they are from the same city/town and have the same gender

  4. D

    they are from different city/town and have the same gender

Show answer

Correct answer

  • D

    they are from different city/town and have the same gender

Question 25

+4 marksOne or more correct options

Study the pseudocode given above and answer the given subquestions.

Study the pseudocode given above and answer the given subquestions.

Which of the following statements are true about this graph? It is a Multiple Select Question (MSQ).

Select all that apply.

  1. A

    There are only two cliques in this graph

  2. B

    In every clique, each pair of students has the same gender

  3. C

    The graph is undirected

  4. D

    All students in a given clique are from different cities/towns

Show answer

Correct answers

  • B

    In every clique, each pair of students has the same gender

  • C

    The graph is undirected

  • D

    All students in a given clique are from different cities/towns

Question 26

+4 marksWritten answer

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

What will the value of S be at the end of the execution when L= [3, 2, 1, 4, 1, 2, 3] ?

Show answer

A written answer, not marked automatically.

Question 27

+3 marksWritten answer

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

What will the value of S be at the end of the execution when L = [4, 3, 2, 1, -1, -2, -3, -4] ?

Show answer

A written answer, not marked automatically.

Question 28

+3 marksOne correct option

A chess tournament is conducted for n players. Each player plays with every other player d times. The result of each match is either a win or loss. The results are stored in a list chess. Each match where player i beats j is recorded as a list (pair) [i, j] in chess. Based on the above data, answer the given subquestions.

The following pseudocode generates graph G (Matrix M) from chess. Each node corresponds to a player. There is an edge from i to j if Player i has beaten Player j at least once. Each edge is associated with a label t that denotes the number of times Player i has beaten Player j in the tournament. Choose the correct code fragment to complete the following pseudocode.

The following pseudocode generates graph G (Matrix M) from chess. Each node corresponds to a player. There is an edge from i to j if Player i has beaten Player j at least once. Each edge is associated with a label t that denotes the number of times Player i has beaten Player j in the tournament. Choose the correct code fragment to complete the following pseudocode.

The following pseudocode generates graph G (Matrix M) from chess. Each node corresponds to a player. There is an edge fr
  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 29

+3 marksOne correct option

A chess tournament is conducted for n players. Each player plays with every other player d times. The result of each match is either a win or loss. The results are stored in a list chess. Each match where player i beats j is recorded as a list (pair) [i, j] in chess. Based on the above data, answer the given subquestions.

Choose the correct statement(s) about graph G. It is a Multiple Select Question.

  1. A

    G is a directed graph

  2. B

    For each vertex i in G, in-degree and out-degree are the same

  3. C

    For each pair of vertices i and j in G, M[i][j] >= d

  4. D

    G is always acyclic

Show answer

Correct answer

  • A

    G is a directed graph

Question 30

+4 marksOne correct option

A chess tournament is conducted for n players. Each player plays with every other player d times. The result of each match is either a win or loss. The results are stored in a list chess. Each match where player i beats j is recorded as a list (pair) [i, j] in chess. Based on the above data, answer the given subquestions.

Figure from the original question paper
  1. A

    When i is not beaten by any other player

  2. B

    When i is beaten by every other player

  3. C

    When i has beaten every other player and not been beaten by any player

  4. D

    When i has not beaten any player

Show answer

Correct answer

  • D

    When i has not beaten any player

Question 31

+3 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

If matrixPh[i][j] = 1, then

  1. A

    i scored at most 10 and at least 20 more marks in Physics than j

  2. B

    i scored at least 10 and at most 20 more marks in Physics than j

  3. C

    j scored at least 10 and at most 20 more marks in Physics than i

  4. D

    j scored at most 10 and at least 20 more marks in Physics than i

Show answer

Correct answer

  • C

    j scored at least 10 and at most 20 more marks in Physics than i

Question 32

+4 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

Choose the correct statement based on given pseudocode.

  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

  • D
    Figure from the original question paper

Question 33

+4 marksOne or more correct options

Based on the above data, answer the given subquestions.

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.

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)

Consider the dictionary D, and the matrices matrixPh, matrixCh and matrixMa computed in the previous question. The follo

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
  5. E
    Figure from the original question paper
Show answer

Correct answers

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

Question 34

+4 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

At the end of the following pseudocode, A captures the number of distinct pairs of students who can help each other in at least one subject, and B captures the number of distinct pairs of students where one can help the other in all subjects. Choose the correct code fragment to complete the pseudocode.

At the end of the following pseudocode, A captures the number of distinct pairs of students who can help each other in at least one subject, and B captures the number of distinct pairs of students where one can help the other in all subjects. Choose the correct code fragment to complete the pseudocode.

At the end of the following pseudocode, A captures the number of distinct pairs of students who can help each other in a
  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

  • D
    Figure from the original question paper

Question 35

+1 markWritten answer

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.
Show answer

A written answer, not marked automatically.

Question 36

+1 markWritten answer

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.
Show answer

A written answer, not marked automatically.

Question 37

+1 markWritten answer

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.
Show answer

A written answer, not marked automatically.

Question 38

+1 markWritten answer

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.
Show answer

A written answer, not marked automatically.

Question 39

+1 markWritten answer

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.
Show answer

A written answer, not marked automatically.

Question 40

+1 markWritten answer

Study the pseudocode given above and answer the given subquestions.

Study the pseudocode given above and answer the given subquestions.
Show answer

A written answer, not marked automatically.

Question 41

+1 markWritten answer

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.
Show answer

A written answer, not marked automatically.

Question 42

+1 markWritten answer

A chess tournament is conducted for n players. Each player plays with every other player d times. The result of each match is either a win or loss. The results are stored in a list chess. Each match where player i beats j is recorded as a list (pair) [i, j] in chess. Based on the above data, answer the given subquestions.

Show answer

A written answer, not marked automatically.

Question 43

+1 markWritten answer

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.
Show answer

A written answer, not marked automatically.