Quiz Space

May 2022 term · Computational Thinking · BSCS1001

Computational Thinking Quiz 1: 5 June 2022, Set 2 (May 2022 term)

The IIT Madras BS Computational Thinking (Computational Thinking (CT)) Quiz 1 paper sat on 5 Jun 2022, in the May 2022 term, set 2: 16 questions for 52 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.

Questions
16
Marks
52
Duration
120 min
MCQ
10
MSQ
6

Updated

Official paper: IIT M FOUNDATION QUIZ1 EXAM QPB1 05 Jun 2022 · No negative marking.

Question 1

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

    YES

  2. B

    NO

Show answer

Correct answer

  • A

    YES

Question 2

+1 markOne correct option
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 or more correct options

Kavya used a variable minBillTotal to find the minimum total bill amount using "Shopping Bills" dataset. There are many ways to initialize minBillTotal, choose the correct option(s). 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

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

Question 4

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

    There might be some change in the values of both A and N, based on theorder of rows

  2. B

    There might be a change in the value of N, based on the order of rows

  3. C

    There will be NO change in the values of both A and N, based on the order ofrows

  4. D

    There might be a change in the value of A, based on the order of rows

Show answer

Correct answer

  • B

    There might be a change in the value of N, based on the order of rows

Question 5

+4 marksOne or more correct options

The following pseudocode is executed using the "Library" dataset. At the end of the execution, A captures the number of books which are published after 2010 or have less than the average number of pages. Assume that the variable Avg holds the value of the average number of pages of the books in the dataset. The pseudocode may have mistakes. Identify all such mistakes (if any). Assume that all statements not listed in the options below are free of errors. It is a Multiple Select Question (MSQ).

The following pseudocode is executed using the "Library" dataset. At the end of the execution, A captures the number of books which are published after 2010 or have less than the average number of pages. Assume that the variable Avg holds the value of the average number of pages of the books in the dataset. The pseudocode may have mistakes. Identify all such mistakes (if any). Assume that all statements not listed in the options below are free of errors. It is a Multiple Select Question (MSQ).

The following pseudocode is executed using the "Library" dataset. At the end of the execution, A captures the number of

Select all that apply.

  1. A

    Error in Line 5

  2. B

    Error in Line 8

  3. C

    Error in Line 9

  4. D

    Error in Line 12

  5. E

    No error in the code

Show answer

Correct answers

  • B

    Error in Line 8

  • D

    Error in Line 12

Question 6

+4 marksOne or more correct options

The following pseudocode is executed using the "Shopping Bills" dataset. At the end of execution, A captures the lowest price of an item purchased from "Big Bazaar". But the pseudocode may have mistakes in one or more lines. Identify all such lines (if any). Assume that all statements not listed in the options below are free of errors. It is a Multiple Select Question (MSQ).

The following pseudocode is executed using the "Shopping Bills" dataset. At the end of execution, A captures the lowest price of an item purchased from "Big Bazaar". But the pseudocode may have mistakes in one or more lines. Identify all such lines (if any). Assume that all statements not listed in the options below are free of errors. It is a Multiple Select Question (MSQ).

The following pseudocode is executed using the "Shopping Bills" dataset. At the end of execution, A captures the lowest

Select all that apply.

  1. A

    Line 1: Incorrect initialization of A

  2. B

    Line 6: Incorrect conditional statement

  3. C

    Line 14: Incorrect initialization of minPrice

  4. D

    Line 17: Incorrect conditional statement

  5. E

    There must be a re-initialization of minPrice before the return statement inprocedure findItem

  6. F

    No error in the code

Show answer

Correct answers

  • A

    Line 1: Incorrect initialization of A

  • B

    Line 6: Incorrect conditional statement

  • C

    Line 14: Incorrect initialization of minPrice

Question 7

+4 marksOne or more correct options

The following pseudocode is executed using the "Words" table. At the end of the execution, C captures the number of pairs of words where both the words have the same part of speech or both words end with a full stop and have the same letter count. Choose the correct code fragment(s) to complete the pseudocode. It is a Multiple Select Question (MSQ).

The following pseudocode is executed using the "Words" table. At the end of the execution, C captures the number of pairs of words where both the words have the same part of speech or both words end with a full stop and have the same letter count. Choose the correct code fragment(s) to complete the pseudocode. It is a Multiple Select Question (MSQ).

The following pseudocode is executed using the "Words" table. At the end of the execution, C captures the number of pair

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 8

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

    Sum of Mathematics marks of students from Chennai

  2. B

    Sum of Mathematics marks of male students from Chennai

  3. C

    Sum of Mathematics marks of male students

  4. D

    Sum of Mathematics marks of male students not from Chennai

Show answer

Correct answer

  • B

    Sum of Mathematics marks of male students from Chennai

Question 9

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

+4 marksOne correct option

The following pseudocode is executed using the "Words" dataset. At the end of the execution, A captures the number of sentences with at least two nouns that have at most two vowels. Choose the correct code fragments to complete the pseudocode.

The following pseudocode is executed using the "Words" dataset. At the end of the execution, A captures the number of sentences with at least two nouns that have at most two vowels. Choose the correct code fragments to complete the pseudocode.

The following pseudocode is executed using the "Words" dataset. At the end of the execution, A captures the number of se
  1. A

    Statement1: A = A + 1Statement2: C = 0Statement3: Not requiredStatement4: i = i + 1

  2. B

    Statement1: C = 0Statement2: A = A + 1Statement3: i = i + 1Statement4: Not required

  3. C

    Statement1: C = 0Statement2: A = A + 1Statement3: Not requiredStatement4: i = i + 1

  4. D

    Statement1: A = A + 1Statement2: C = 0Statement3: i = i + 1Statement4: Not required

Show answer

Correct answer

  • A

    Statement1: A = A + 1Statement2: C = 0Statement3: Not requiredStatement4: i = i + 1

Question 11

+3 marksOne correct option

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

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

Let X be a row in the "Words" table. Let isShortVerb be a procedure to find whether the word in the row X is a verb with
  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 12

+3 marksOne correct option

A long word is defined as a word having at least 6 letters. The given pseudocode is used to find the average number of letters per word for long words from the "Words" dataset. Choose the correct code fragment to complete the pseudocode.

A long word is defined as a word having at least 6 letters. The given pseudocode is used to find the average number of letters per word for long words from the "Words" dataset. Choose the correct code fragment to complete the pseudocode.

A long word is defined as a word having at least 6 letters. The given pseudocode is used to find the average number of l
  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 13

+3 marksOne correct option

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

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

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

    Number of students with all subject marks more than 70

  2. B

    Number of students with exactly one subject marks less than 70

  3. C

    Number of students with all subject marks less than 70

  4. D

    Number of students with all subject marks at least 70

Show answer

Correct answer

  • C

    Number of students with all subject marks less than 70

Question 14

+3 marksOne correct option

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

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

The given pseudocode is executed using the "Scores" dataset. There is a hypothesis that if a student performs well overa
  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 15

+5 marksOne or more correct options

The following pseudocode is executed using the "Words" dataset. A counts the number of pairs of words which have equal number of vowels and consonants. But the pseudocode may have mistakes in one or more lines. Identify all such lines (if any). Assume that all statements not listed in the options below are free of errors. It is a Multiple Select Question (MSQ).

The following pseudocode is executed using the "Words" dataset. A counts the number of pairs of words which have equal number of vowels and consonants. But the pseudocode may have mistakes in one or more lines. Identify all such lines (if any). Assume that all statements not listed in the options below are free of errors. It is a Multiple Select Question (MSQ).

The following pseudocode is executed using the "Words" dataset. A counts the number of pairs of words which have equal n

Select all that apply.

  1. A

    Error in Line 5

  2. B

    Error in Line 11

  3. C

    Error in Line 12

  4. D

    Error in Line 16

  5. E

    Error in Line 20

  6. F

    Error in Line 22

  7. G

    Error in Line 28

  8. H

    Error in Line 30

  9. I

    No error in the code

Show answer

Correct answers

  • C

    Error in Line 12

  • D

    Error in Line 16

  • G

    Error in Line 28

Question 16

+5 marksOne or more correct options

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, A captures the number of female students who are above average in at least one subject. Assume that the variables M, P and C hold the average marks of the subjects Mathematics, Physics and Chemistry respectively. The pseudocode may have mistakes. Identify all such mistakes (if any). Assume that all statements not listed in the options below are free of errors. It is a Multiple Select Question (MSQ).

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, A captures the number of female students who are above average in at least one subject. Assume that the variables M, P and C hold the average marks of the subjects Mathematics, Physics and Chemistry respectively. The pseudocode may have mistakes. Identify all such mistakes (if any). Assume that all statements not listed in the options below are free of errors. It is a Multiple Select Question (MSQ).

The following pseudocode is executed using the "Scores" dataset. At the end of the execution, A captures the number of f

Select all that apply.

  1. A

    Error in Line 4

  2. B

    Error in Line 5

  3. C

    Error in Line 11

  4. D

    Error in Line 12

  5. E

    Multiple return(False) in procedure CheckSomething

  6. F

    No error in the code

Show answer

Correct answers

  • B

    Error in Line 5

  • D

    Error in Line 12