Quiz Space

May 2023 term · Computational Thinking · BSCS1001

Computational Thinking (CT) End Term: 3 September 2023, Set 4 (May 2023 term)

The IIT Madras BS Computational Thinking (Computational Thinking (CT)) End Term paper sat on 3 Sept 2023, in the May 2023 term, set 4: 39 questions for 112 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
39
Marks
112
Duration
180 min
MCQ
26
MSQ
2
Written
11

Updated

Official paper: IIT M FOUNDATION ET1 EXAM QPF2 S2 03 Sep · No negative marking.

Question 1

+1 markOne correct option

THIS IS QUESTION PAPER FOR THE SUBJECT "FOUNDATION LEVEL : SEMESTER 1: 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

+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

  • C
    Figure from the original question paper

Question 4

+3 marksOne correct option

The following pseudocode is executed using the “Scores” dataset. Two students form a study pair if the difference of their Physics marks is at most 20.

The following pseudocode is executed using the “Scores” dataset. Two students form a study pair if the difference of their Physics marks is at most 20. Based on the above data, answer the given subquestions.

The following pseudocode is executed using the “Scores” dataset. Two students form a study pair if the difference of the

What will count1 represent at the end of execution?

  1. A

    Number of study pairs

  2. B

    Number of pairs of study pairs

  3. C

    Number of students who formed study pairs

  4. D

    Number of study pairs from the same city

Show answer

Correct answer

  • A

    Number of study pairs

Question 5

+3 marksOne correct option

The following pseudocode is executed using the “Scores” dataset. Two students form a study pair if the difference of their Physics marks is at most 20.

The following pseudocode is executed using the “Scores” dataset. Two students form a study pair if the difference of their Physics marks is at most 20. Based on the above data, answer the given subquestions.

The following pseudocode is executed using the “Scores” dataset. Two students form a study pair if the difference of the

What will count2 represent at the end of execution?

  1. A

    Number of study pairs where students in each pair are from the same city

  2. B

    Number of study pairs where students in each pair are from different citiesamong Mumbai, Vellore and Kolkata

  3. C

    Number of study pairs where students in each pair are from the same cityamong Mumbai, Vellore and Kolkata

  4. D

    Number of study pairs where students in each pair are from different city

Show answer

Correct answer

  • C

    Number of study pairs where students in each pair are from the same cityamong Mumbai, Vellore and Kolkata

Question 6

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

+3 marksOne correct option

The following pseudocode is executed using the “Words” dataset. Study the given pseudocode and answer the subquestions.

The following pseudocode is executed using the “Words” dataset. Study the given pseudocode and answer the subquestions.

The following pseudocode is executed using the “Words” dataset. Study the given pseudocode and answer the subquestions.

What will outList represent at the end of execution?

  1. A

    List of lists of last word of each sentence

  2. B

    List of lists of first word of each sentence

  3. C

    List of lists of last and first word of each sentence in that order

  4. D

    List of lists of first and last word of each sentence in that order

  5. E

    List of lists of first and last word of each sentence in any order

Show answer

Correct answer

  • C

    List of lists of last and first word of each sentence in that order

Question 8

+2 marksOne correct option

The following pseudocode is executed using the “Words” dataset. Study the given pseudocode and answer the subquestions.

The following pseudocode is executed using the “Words” dataset. Study the given pseudocode and answer the subquestions.

The following pseudocode is executed using the “Words” dataset. Study the given pseudocode and answer the subquestions.

At the end of execution the value of length(outList) will be same as the total number of words in the dataset.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 9

+5 marksOne correct option

The given pseudocode is executed using the “Words” dataset. C stores the number of nouns which have at least one verb adjacent to it. Choose the correct code fragment to complete the pseudocode.

The given pseudocode is executed using the “Words” dataset. C stores the number of nouns which have at least one verb adjacent to it. Choose the correct code fragment to complete the pseudocode.

The given pseudocode is executed using the “Words” dataset. C stores the number of nouns which have at least one verb ad
  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

  • A
    Figure from the original question paper

Question 10

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

+5 marksOne correct option

The following pseudocode is executed using the “Scores” dataset. What will the value of L represent at the end of the execution?

The following pseudocode is executed using the “Scores” dataset. What will the value of L represent at the end of the execution?

The following pseudocode is executed using the “Scores” dataset. What will the value of L represent at the end of the ex
  1. A

    List of cities in which the difference of highest total and lowest total marks ofstudents is same

  2. B

    List of cities in which the difference of highest total and lowest total marks ofstudents is maximum

  3. C

    List of cities in which the difference of highest total and lowest total marks ofstudents is minimum

  4. D

    List of cities in which the difference of highest total and lowest total marks ofstudents is 301

Show answer

Correct answer

  • C

    List of cities in which the difference of highest total and lowest total marks ofstudents is minimum

Question 12

+5 marksOne correct option

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

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

The given pseudocode is executed using the “Words” dataset. What will A represent at the end of execution?
  1. A

    Frequency count of a vowel which occurs in maximum number of words in thedataset

  2. B

    Frequency count of a vowel which occurs maximum times in a single word

  3. C

    Frequency count of a vowel which occurs in maximum number of sentences inthe dataset

  4. D

    Frequency count of the most frequent vowel in the dataset

Show answer

Correct answer

  • D

    Frequency count of the most frequent vowel in the dataset

Question 13

+3 marksOne correct option

Consider a graph generated from n rows of “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from n rows of “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from n rows of “Scores” table that is represented by a matrix M. Each node in the graph corre

For each pair of vertices i and j with i != j, choose the correct statement about M[i][j].

  1. A

    M[i][j] is a list of subjects in which i scores more than j

  2. B

    M[i][j] is the number of subjects in which i scores more than j

  3. C

    M[i][j] is a list of subjects in which i scores less than j

  4. D

    M[i][j] is the number of subjects in which i scores less than j

Show answer

Correct answer

  • C

    M[i][j] is a list of subjects in which i scores less than j

Question 14

+3 marksOne correct option

Consider a graph generated from n rows of “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from n rows of “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from n rows of “Scores” table that is represented by a matrix M. Each node in the graph corre

Which of the following indicates that student i has scored the maximum marks in subject S?

  1. A

    S appears in M[i][j] for every j

  2. B

    S appears in M[j][i] for every j

  3. C

    S does not appear in M[i][j] for any j

  4. D

    S does not appear in M[j][i] for any j

Show answer

Correct answer

  • C

    S does not appear in M[i][j] for any j

Question 15

+3 marksOne correct option

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds

There is an edge between students i and j, with i != j, if:

  1. A

    they are from the same city/town

  2. B

    they have the same gender

  3. C

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

  4. D

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

Show answer

Correct answer

  • D

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

Question 16

+4 marksOne correct option

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds

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

  1. A

    There are only two cliques in this graph

  2. B

    All students in a given clique have the same gender

  3. C

    The graph is directed

  4. D

    All students in a given clique can be from different cities/towns

Show answer

Correct answer

  • D

    All students in a given clique can be from different cities/towns

Question 17

+4 marksOne correct option

Consider a graph generated from the “Words” table that is represented by a matrix M. Each node in the graph corresponds to a word from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Words” table that is represented by a matrix M. Each node in the graph corresponds to a word from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Words” table that is represented by a matrix M. Each node in the graph corresponds

There will be an edge from word i to j if:

  1. A

    The letter count and part of speech of words i and j are same

  2. B

    The letter count of word i is more than j and both have different part of speech

  3. C

    The letter count of word i is one more than j and both have different part ofspeech

  4. D

    The letter count of word j is one more than i and both have different part ofspeech

Show answer

Correct answer

  • D

    The letter count of word j is one more than i and both have different part ofspeech

Question 18

+2 marksOne correct option

Consider a graph generated from the “Words” table that is represented by a matrix M. Each node in the graph corresponds to a word from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Words” table that is represented by a matrix M. Each node in the graph corresponds to a word from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Words” table that is represented by a matrix M. Each node in the graph corresponds

Every pair of nodes with the same part of speech is connected by an edge.

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 19

+4 marksOne correct option

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds

Choose the correct statement based on given pseudocode.

  1. A

    For all i and j, if Ph[i][j] = 1 then Ph[j][i] = 0

  2. B

    For all i and j, if Ph[i][j] = 0 then Ph[j][i] = 1

  3. C

    For all i and j, if Ph[i][j] = 1 then Ph[j][i] = 1

  4. D

    For all i and j, if Ph[i][j] = 0 then Ph[j][i] = 0

Show answer

Correct answer

  • A

    For all i and j, if Ph[i][j] = 1 then Ph[j][i] = 0

Question 20

+4 marksOne or more correct options

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds

Choose the correct statement(s) based on given pseudocode. It is a Multiple Select Question.

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
  • D
    Figure from the original question paper

Question 21

+3 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

What will be the values of A and B at the end of execution of pseudocode given below?

What will be the values of A and B at the end of execution of pseudocode given below?

What will be the values of A and B at the end of execution of pseudocode given below?
  1. A

    A = 1, B = 1

  2. B

    A = 1, B = 0

  3. C

    A = 0, B = 1

  4. D

    A = 0, B = 0

Show answer

Correct answer

  • B

    A = 1, B = 0

Question 22

+3 marksOne correct option

Based on the above data, answer the given subquestions.

Based on the above data, answer the given subquestions.

What will be the values of A and B at the end of execution of pseudocode given below?

What will be the values of A and B at the end of execution of pseudocode given below?

What will be the values of A and B at the end of execution of pseudocode given below?
  1. A

    A = 1, B = 1

  2. B

    A = 1, B = 0

  3. C

    A = 0, B = 1

  4. D

    A = 0, B = 0

Show answer

Correct answer

  • B

    A = 1, B = 0

Question 23

+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
  • C
    Figure from the original question paper

Question 24

+4 marksWritten answer

The procedure calculate takes two positive integers as arguments and returns an integer. Study the given pseudocode and answer the subquestions.

The procedure calculate takes two positive integers as arguments and returns an integer. Study the given pseudocode and answer the subquestions.

The procedure calculate takes two positive integers as arguments and returns an integer. Study the given pseudocode and

What does calculate(5, 3) return?

Show answer

A written answer, not marked automatically.

Question 25

+4 marksOne correct option

The procedure calculate takes two positive integers as arguments and returns an integer. Study the given pseudocode and answer the subquestions.

The procedure calculate takes two positive integers as arguments and returns an integer. Study the given pseudocode and answer the subquestions.

The procedure calculate takes two positive integers as arguments and returns an integer. Study the given pseudocode and

Which of the following is the output returned by calculate(y, x)?

  1. A

    y + x + (x-1) + .... + 1

  2. B

    x + (x-1) + .... + 1

  3. C

    x + y + (y-1) + .... + 1

  4. D

    x.y

Show answer

Correct answer

  • A

    y + x + (x-1) + .... + 1

Question 26

+4 marksOne correct option

Consider the given pseudocode, two positive integers, a and b are the input parameters of procedure mystery, where a ≥ b.

Consider the given pseudocode, two positive integers, a and b are the input parameters of procedure mystery, where a ≥ b. Based on the above data, answer the given subquestions.

Consider the given pseudocode, two positive integers, a and b are the input parameters of procedure mystery, where a ≥ b

What will the return value of procedure doSomething(U, V) represent, where U ≥ V?

  1. A

    Remainder when V is divided by U

  2. B

    Remainder when U is divided by V

  3. C

    Quotient when V is divided by U

  4. D

    Quotient when U is divided by V

  5. E

    Can not say anything

Show answer

Correct answer

  • B

    Remainder when U is divided by V

Question 27

+4 marksOne correct option

Consider the given pseudocode, two positive integers, a and b are the input parameters of procedure mystery, where a ≥ b.

Consider the given pseudocode, two positive integers, a and b are the input parameters of procedure mystery, where a ≥ b. Based on the above data, answer the given subquestions.

Consider the given pseudocode, two positive integers, a and b are the input parameters of procedure mystery, where a ≥ b

What will A represent at the end of the execution?

  1. A

    LCM of positive integers, a and b

  2. B

    HCF (GCD) of positive integers, a and b

  3. C

    Product of integers, a and b

  4. D

    Sum of integers, a and b

Show answer

Correct answer

  • B

    HCF (GCD) of positive integers, a and b

Question 28

+3 marksOne correct option

Consider the following graph with five nodes. A is the 6 × 6 adjacency matrix corresponding to this graph.

Consider the following graph with five nodes. A is the 6 × 6 adjacency matrix corresponding to this graph. Based on the above data, answer the given subquestions.

Consider the following graph with five nodes. A is the 6 × 6 adjacency matrix corresponding to this graph.

What will be the value of L after executing the given pseudocode?

  1. A

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

  2. B

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

  3. C

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

  4. D

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

Show answer

Correct answer

  • B

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

Question 29

+2 marksOne correct option

Consider the following graph with five nodes. A is the 6 × 6 adjacency matrix corresponding to this graph.

Consider the following graph with five nodes. A is the 6 × 6 adjacency matrix corresponding to this graph. Based on the above data, answer the given subquestions.

Consider the following graph with five nodes. A is the 6 × 6 adjacency matrix corresponding to this graph.

What will be the value of keys(D) after executing the given pseudocode?

  1. A

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

  2. B

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

  3. C

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

  4. D

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

  5. E

    Can not be determined

Show answer

Correct answer

  • E

    Can not be determined

Question 30

+1 markWritten answer

The following pseudocode is executed using the “Scores” dataset. Two students form a study pair if the difference of their Physics marks is at most 20.

The following pseudocode is executed using the “Scores” dataset. Two students form a study pair if the difference of their Physics marks is at most 20. Based on the above data, answer the given subquestions.

The following pseudocode is executed using the “Scores” dataset. Two students form a study pair if the difference of the
Show answer

A written answer, not marked automatically.

Question 31

+1 markWritten answer

The following pseudocode is executed using the “Words” dataset. Study the given pseudocode and answer the subquestions.

The following pseudocode is executed using the “Words” dataset. Study the given pseudocode and answer the subquestions.

The following pseudocode is executed using the “Words” dataset. Study the given pseudocode and answer the subquestions.
Show answer

A written answer, not marked automatically.

Question 32

+1 markWritten answer

Consider a graph generated from n rows of “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from n rows of “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from n rows of “Scores” table that is represented by a matrix M. Each node in the graph corre
Show answer

A written answer, not marked automatically.

Question 33

+1 markWritten answer

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds
Show answer

A written answer, not marked automatically.

Question 34

+1 markWritten answer

Consider a graph generated from the “Words” table that is represented by a matrix M. Each node in the graph corresponds to a word from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Words” table that is represented by a matrix M. Each node in the graph corresponds to a word from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Words” table that is represented by a matrix M. Each node in the graph corresponds
Show answer

A written answer, not marked automatically.

Question 35

+1 markWritten answer

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds to a student from the table. SeqNo is used to label the nodes in the graph. Study the given pseudocode and answer the subquestions.

Consider a graph generated from the “Scores” table that is represented by a matrix M. Each node in the graph corresponds
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

The procedure calculate takes two positive integers as arguments and returns an integer. Study the given pseudocode and answer the subquestions.

The procedure calculate takes two positive integers as arguments and returns an integer. Study the given pseudocode and answer the subquestions.

The procedure calculate takes two positive integers as arguments and returns an integer. Study the given pseudocode and
Show answer

A written answer, not marked automatically.

Question 38

+1 markWritten answer

Consider the given pseudocode, two positive integers, a and b are the input parameters of procedure mystery, where a ≥ b.

Consider the given pseudocode, two positive integers, a and b are the input parameters of procedure mystery, where a ≥ b. Based on the above data, answer the given subquestions.

Consider the given pseudocode, two positive integers, a and b are the input parameters of procedure mystery, where a ≥ b
Show answer

A written answer, not marked automatically.

Question 39

+1 markWritten answer

Consider the following graph with five nodes. A is the 6 × 6 adjacency matrix corresponding to this graph.

Consider the following graph with five nodes. A is the 6 × 6 adjacency matrix corresponding to this graph. Based on the above data, answer the given subquestions.

Consider the following graph with five nodes. A is the 6 × 6 adjacency matrix corresponding to this graph.
Show answer

A written answer, not marked automatically.