Quiz Space

September 2022 term · Computational Thinking · BSCS1001

Computational Thinking (CT) End Term: 11 December 2022, Set 3 (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 3: 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 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

+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

    The code will through an error due to incorrect return statements in line 15and 18

Show answer

Correct answer

  • C

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

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

  • 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

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

The following pseudocode is executed on the "Words" dataset. What will Count2 represent at the end of the execution?

The following pseudocode is executed on the "Words" dataset. What will Count2 represent at the end of the execution?

The following pseudocode is executed on the "Words" dataset. What will Count2 represent at the end of the execution?
  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

  • A

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

Question 7

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

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

  2. B

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

  3. C

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

  4. D

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

Show answer

Correct answer

  • B

    L = [1, 0, 2, 3, 4, 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
  • C
    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

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode.

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode. Based on the above data, answer the given subquestions.

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode.

length(LB) == length(LA) - 1

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 11

+1 markOne correct option

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode.

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode. Based on the above data, answer the given subquestions.

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode.

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

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 12

+1 markOne correct option

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode.

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode. Based on the above data, answer the given subquestions.

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode.

Each element of LB is a copy of LA

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 13

+1 markOne correct option

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode.

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode. Based on the above data, answer the given subquestions.

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode.

last(LB) == LA

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • B

    FALSE

Question 14

+1 markOne correct option

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode.

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode. Based on the above data, answer the given subquestions.

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode.

Each element of LB is a non-empty list

  1. A

    TRUE

  2. B

    FALSE

Show answer

Correct answer

  • A

    TRUE

Question 15

+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 of last word of each sentence

  2. B

    List of lists of 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

  • C

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

Question 16

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

+4 marksOne correct option

stations is a list that contains the sequence of stations visited by a train from the "Trains" dataset. Each element in stations is a list: [Name, Distance], the first entry is the name of the station, while the second entry is the distance of this station from the first station in the list. minDist is a procedure that accepts stations as a parameter and returns the names of a pair of consecutive stations which have the shortest distance between them on this route. Complete the following procedure.

stations is a list that contains the sequence of stations visited by a train from the "Trains" dataset. Each element in stations is a list: [Name, Distance], the first entry is the name of the station, while the second entry is the distance of this station from the first station in the list. minDist is a procedure that accepts stations as a parameter and returns the names of a pair of consecutive stations which have the shortest distance between them on this route. Complete the following procedure. Based on the above data, answer the given subquestions.

stations is a list that contains the sequence of stations visited by a train from the "Trains" dataset. Each element in

There may be multiple pairs having the same minimum 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

  • A
    Figure from the original question paper

Question 18

+3 marksOne correct option

stations is a list that contains the sequence of stations visited by a train from the "Trains" dataset. Each element in stations is a list: [Name, Distance], the first entry is the name of the station, while the second entry is the distance of this station from the first station in the list. minDist is a procedure that accepts stations as a parameter and returns the names of a pair of consecutive stations which have the shortest distance between them on this route. Complete the following procedure.

stations is a list that contains the sequence of stations visited by a train from the "Trains" dataset. Each element in stations is a list: [Name, Distance], the first entry is the name of the station, while the second entry is the distance of this station from the first station in the list. minDist is a procedure that accepts stations as a parameter and returns the names of a pair of consecutive stations which have the shortest distance between them on this route. Complete the following procedure. Based on the above data, answer the given subquestions.

stations is a list that contains the sequence of stations visited by a train from the "Trains" dataset. Each element in

There may be multiple pairs having the same minimum 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

  • B
    Figure from the original question paper

Question 19

+2 marksOne correct option

trains is a list that contains information about trains associated with a station stn. Specifically, each element in this list is another list: [Arrival, Departure]. If the arrival or departure time is empty, it is represented as "None".

trains is a list that contains information about trains associated with a station stn. Specifically, each element in this list is another list: [Arrival, Departure]. If the arrival or departure time is empty, it is represented as "None". Based on the above data, answer the given subquestions.

trains is a list that contains information about trains associated with a station stn. Specifically, each element in thi

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 20

+2 marksOne correct option

trains is a list that contains information about trains associated with a station stn. Specifically, each element in this list is another list: [Arrival, Departure]. If the arrival or departure time is empty, it is represented as "None".

trains is a list that contains information about trains associated with a station stn. Specifically, each element in this list is another list: [Arrival, Departure]. If the arrival or departure time is empty, it is represented as "None". Based on the above data, answer the given subquestions.

trains is a list that contains information about trains associated with a station stn. Specifically, each element in thi

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 21

+3 marksOne correct option

trains is a list that contains information about trains associated with a station stn. Specifically, each element in this list is another list: [Arrival, Departure]. If the arrival or departure time is empty, it is represented as "None".

trains is a list that contains information about trains associated with a station stn. Specifically, each element in this list is another list: [Arrival, Departure]. If the arrival or departure time is empty, it is represented as "None". Based on the above data, answer the given subquestions.

trains is a list that contains information about trains associated with a station stn. Specifically, each element in thi

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 22

+3 marksOne correct option

Consider a graph generated from the "Scores" dataset that is represented by a matrix B. Each node in the graph corresponds to a student from the dataset. SeqNo is used to label the nodes in the graph.

Consider a graph generated from the "Scores" dataset that is represented by a matrix B. Each node in the graph corresponds to a student from the dataset. SeqNo is used to label the nodes in the graph. Study the pseudocode above and answer the given subquestions.

Consider a graph generated from the "Scores" dataset that is represented by a matrix B. Each node in the graph correspon
Figure from the original question paper
  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 and have the same gender

  4. D

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

Show answer

Correct answer

  • C

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

Question 23

+4 marksOne or more correct options

Consider a graph generated from the "Scores" dataset that is represented by a matrix B. Each node in the graph corresponds to a student from the dataset. SeqNo is used to label the nodes in the graph.

Consider a graph generated from the "Scores" dataset that is represented by a matrix B. Each node in the graph corresponds to a student from the dataset. SeqNo is used to label the nodes in the graph. Study the pseudocode above and answer the given subquestions.

Consider a graph generated from the "Scores" dataset that is represented by a matrix B. Each node in the graph correspon

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 can be 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

Question 24

+4 marksWritten answer

Consider the procedure doSomething given below.

Consider the procedure doSomething given below. Based on the above data, answer the given subquestions.

Consider the procedure doSomething given below.

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

Show answer

A written answer, not marked automatically.

Question 25

+3 marksWritten answer

Consider the procedure doSomething given below.

Consider the procedure doSomething given below. Based on the above data, answer the given subquestions.

Consider the procedure doSomething given below.

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

Show answer

A written answer, not marked automatically.

Question 26

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

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

  • C

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

Question 28

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

Consider the following procedure specialVertex.

Consider the following procedure specialVertex. When will the procedure specialVertex(M, i) return True?

Consider the following procedure specialVertex.
  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 beaten every other player

Show answer

Correct answer

  • A

    When i is not beaten by any other player

Question 29

+3 marksOne correct option

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adjacency matrix of the graph generated from the dataset.

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adjacency matrix of the graph generated from the dataset. Based on the above data, answer the given subquestions.

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adja

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

  • B

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

Question 30

+4 marksOne correct option

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adjacency matrix of the graph generated from the dataset.

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adjacency matrix of the graph generated from the dataset. Based on the above data, answer the given subquestions.

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adja

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

Correct answer

  • B
    Figure from the original question paper

Question 31

+4 marksOne or more correct options

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adjacency matrix of the graph generated from the dataset.

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adjacency matrix of the graph generated from the dataset. Based on the above data, answer the given subquestions.

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adja

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

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

Question 32

+4 marksOne correct option

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adjacency matrix of the graph generated from the dataset.

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adjacency matrix of the graph generated from the dataset. Based on the above data, answer the given subquestions.

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adja

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 33

+3 marksOne correct option

Consider the pseudocode given below where intA is a positive integer and listL is a non-empty list of positive integers.

Consider the pseudocode given below where intA is a positive integer and listL is a non-empty list of positive integers. Based on the above data, answer the given subquestions.

Consider the pseudocode given below where intA is a positive integer and listL is a non-empty list of positive integers.

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

  • C

    The highest number among intA and all the elements of listL

Question 34

+3 marksOne correct option

Consider the pseudocode given below where intA is a positive integer and listL is a non-empty list of positive integers.

Consider the pseudocode given below where intA is a positive integer and listL is a non-empty list of positive integers. Based on the above data, answer the given subquestions.

Consider the pseudocode given below where intA is a positive integer and listL is a non-empty list of positive integers.

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 35

+1 markWritten answer

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode.

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode. Based on the above data, answer the given subquestions.

Let LA be a non-empty list of integers. A list LB is constructed using the following pseudocode.
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

stations is a list that contains the sequence of stations visited by a train from the "Trains" dataset. Each element in stations is a list: [Name, Distance], the first entry is the name of the station, while the second entry is the distance of this station from the first station in the list. minDist is a procedure that accepts stations as a parameter and returns the names of a pair of consecutive stations which have the shortest distance between them on this route. Complete the following procedure.

stations is a list that contains the sequence of stations visited by a train from the "Trains" dataset. Each element in stations is a list: [Name, Distance], the first entry is the name of the station, while the second entry is the distance of this station from the first station in the list. minDist is a procedure that accepts stations as a parameter and returns the names of a pair of consecutive stations which have the shortest distance between them on this route. Complete the following procedure. Based on the above data, answer the given subquestions.

stations is a list that contains the sequence of stations visited by a train from the "Trains" dataset. Each element in
Show answer

A written answer, not marked automatically.

Question 38

+1 markWritten answer

trains is a list that contains information about trains associated with a station stn. Specifically, each element in this list is another list: [Arrival, Departure]. If the arrival or departure time is empty, it is represented as "None".

trains is a list that contains information about trains associated with a station stn. Specifically, each element in this list is another list: [Arrival, Departure]. If the arrival or departure time is empty, it is represented as "None". Based on the above data, answer the given subquestions.

trains is a list that contains information about trains associated with a station stn. Specifically, each element in thi
Show answer

A written answer, not marked automatically.

Question 39

+1 markWritten answer

Consider a graph generated from the "Scores" dataset that is represented by a matrix B. Each node in the graph corresponds to a student from the dataset. SeqNo is used to label the nodes in the graph.

Consider a graph generated from the "Scores" dataset that is represented by a matrix B. Each node in the graph corresponds to a student from the dataset. SeqNo is used to label the nodes in the graph. Study the pseudocode above and answer the given subquestions.

Consider a graph generated from the "Scores" dataset that is represented by a matrix B. Each node in the graph correspon
Show answer

A written answer, not marked automatically.

Question 40

+1 markWritten answer

Consider the procedure doSomething given below.

Consider the procedure doSomething given below. Based on the above data, answer the given subquestions.

Consider the procedure doSomething given below.
Show answer

A written answer, not marked automatically.

Question 41

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

+1 markWritten answer

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adjacency matrix of the graph generated from the dataset.

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adjacency matrix of the graph generated from the dataset. Based on the above data, answer the given subquestions.

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, matrix represents the adja
Show answer

A written answer, not marked automatically.

Question 43

+1 markWritten answer

Consider the pseudocode given below where intA is a positive integer and listL is a non-empty list of positive integers.

Consider the pseudocode given below where intA is a positive integer and listL is a non-empty list of positive integers. Based on the above data, answer the given subquestions.

Consider the pseudocode given below where intA is a positive integer and listL is a non-empty list of positive integers.
Show answer

A written answer, not marked automatically.