Quiz Space

January 2024 term · Computational Thinking · BSCS1001

Computational Thinking (CT) Quiz 1: 25 February 2024, Set 5 (January 2024 term)

The IIT Madras BS Computational Thinking (Computational Thinking (CT)) Quiz 1 paper sat on 25 Feb 2024, in the January 2024 term, set 5: 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
12
MSQ
3
Written
1

Updated

Official paper: IIT M FOUNDATION AN4 EXAM QDF4 25 Feb 2024 · No negative marking.

Question 1

+1 markOne correct option

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

+3 marksOne correct option

The following pseudocode is executed using the “Library” dataset. What will B represent at the end of execution?

The following pseudocode is executed using the “Library” dataset. What will B represent at the end of execution?

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

    Number of books written by author Kalam in English

  2. B

    Number of books not written by author Kalam in English

  3. C

    Number of English books written by authors other than Kalam

  4. D

    Number of books that are written by author Kalam or in English or both

Show answer

Correct answer

  • D

    Number of books that are written by author Kalam or in English or both

Question 4

+3 marksOne correct option

The following pseudocode is executed using the "Scores" dataset. At the end of the execution of below pseudocode, if count2 represents the number of male students whose Physics marks are less than or equal to Mathematics marks, then select the correct code fragment for A and B.

The following pseudocode is executed using the "Scores" dataset. At the end of the execution of below pseudocode, if count2 represents the number of male students whose Physics marks are less than or equal to Mathematics marks, then select the correct code fragment for A and B.

The following pseudocode is executed using the "Scores" dataset. At the end of the execution of below pseudocode, if cou
  1. A
    Figure from the original question paper
  2. B
    Figure from the original question paper
  3. C
    Figure from the original question paper
  4. D
    Figure from the original question paper
Show answer

Correct answer

  • C
    Figure from the original question paper

Question 5

+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 highest marks in Mathematics among the threesubjects

  2. B

    Number of students with highest marks in Mathematics and lowest marks inPhysics

  3. C

    Number of students with highest marks in Chemistry among the threesubjects

  4. D

    Number of students with lowest marks in Physics among the three subjects

Show answer

Correct answer

  • D

    Number of students with lowest marks in Physics among the three subjects

Question 6

+3 marksOne correct option

The following pseudocode is executed using the “Words” dataset.

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

The following pseudocode is executed using the “Words” dataset.
  1. A

    Number of words with at least one pair of vowels occurring consecutively

  2. B

    Number of words with at most two pairs of vowels occurring consecutively

  3. C

    Number of words with at least two pairs of the same vowel occurringconsecutively

  4. D

    Number of words with at most two pairs of the same vowel occurringconsecutively

Show answer

Correct answer

  • A

    Number of words with at least one pair of vowels occurring consecutively

Question 7

+4 marksOne correct option

The following pseudocode is executed using the "Words" table. At the end of the execution, count stores the number of pairs of nouns such that both nouns have either the same letter count or both end with a full stop. Choose the correct code fragment to complete the pseudocode.

The following pseudocode is executed using the "Words" table. At the end of the execution, count stores the number of pairs of nouns such that both nouns have either the same letter count or both end with a full stop. Choose the correct code fragment to complete the pseudocode.

The following pseudocode is executed using the "Words" table. At the end of the execution, count
stores the number of pa
  1. A

    Statement 1: X.PartOfSpeech == Y.PartOfSpeechStatement 2: X.LetterCount == Y.LetterCountStatement 3: X.Word and Y.Word end with a full stop

  2. B

    Statement 1: X.Word and Y.Word end with a full stopStatement 2: X.PartOfSpeech == Y.PartOfSpeechStatement 3: X.LetterCount == Y.LetterCount

  3. C

    Statement 1: X.LetterCount == Y.LetterCountStatement 2: X.Word and Y.Word end with a full stopStatement 3: X.PartOfSpeech == Y.PartOfSpeech

  4. D

    Statement 1: X.LetterCount == Y.LetterCountStatement 2: X.PartOfSpeech == Y.PartOfSpeechStatement 3: X.Word and Y.Word end with a full stop

Show answer

Correct answer

  • A

    Statement 1: X.PartOfSpeech == Y.PartOfSpeechStatement 2: X.LetterCount == Y.LetterCountStatement 3: X.Word and Y.Word end with a full stop

Question 8

+4 marksOne correct option

The following pseudocode is executed using the “Scores” dataset. At the end of the execution,variable Count captures the number of students whose total marks are more than the class average (of total marks) but have scored below the subject average in at least one subject. Assume that the variable AvgT holds the value of the average total marks. Similarly, the variables AvgP,AvgC and AvgM hold the value of the average marks of Physics, Chemistry and Mathematics respectively. Choose the correct code fragment to complete the pseudocode.

The following pseudocode is executed using the “Scores” dataset. At the end of the execution,variable Count captures the number of students whose total marks are more than the class average (of total marks) but have scored below the subject average in at least one subject. Assume that the variable AvgT holds the value of the average total marks. Similarly, the variables AvgP,AvgC and AvgM hold the value of the average marks of Physics, Chemistry and Mathematics respectively. Choose the correct code fragment to complete the pseudocode.

The following pseudocode is executed using the “Scores” dataset. At the end of the execution,variable Count captures the
  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 9

+4 marksOne correct option

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

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

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

    Number of sentences with average letter count more than the average lettercount of dataset

  2. B

    Number of sentences with average letter count less than the average lettercount of dataset

  3. C

    Number of words with average letter count more than the average letter countper word of dataset

  4. D

    Number of words with average letter count less than the average letter countper word of dataset

Show answer

Correct answer

  • B

    Number of sentences with average letter count less than the average lettercount of dataset

Question 10

+4 marksOne correct option

Procedure miniSum accepts three numbers as parameters and returns the sum of two smallest numbers. Choose the correct code fragment to complete the procedure.

Procedure miniSum accepts three numbers as parameters and returns the sum of two smallest numbers. Choose the correct code fragment to complete the procedure.

Procedure miniSum accepts three numbers as parameters and returns the sum of two smallest numbers. Choose the correct co
  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 11

+4 marksOne correct option

The following pseudocode is executed using the “Olympics” dataset. Procedure doSomething accepts a table of rows which contains rows of the same player. Assume that the player has won at least two medals and only one medal in any year. What will (B - A) represent at the end of the execution?

The following pseudocode is executed using the “Olympics” dataset. Procedure doSomething accepts a table of rows which contains rows of the same player. Assume that the player has won at least two medals and only one medal in any year. What will (B - A) represent at the end of the execution?

The following pseudocode is executed using the “Olympics” dataset. Procedure doSomething
accepts a table of rows which c
  1. A

    Year gap between first and second medal won by a player

  2. B

    Year gap between first and latest medal won by a player

  3. C

    Year gap between latest and second latest medal won by a player

  4. D

    Year gap between first and second latest medal won by a player

Show answer

Correct answer

  • A

    Year gap between first and second medal won by a player

Question 12

+3 marksOne correct option

The given pseudocode is executed using the “Olympics” table. What will count represent at the end of the execution? Assume all players have distinct names.

The given pseudocode is executed using the “Olympics” table. What will count represent at the end of the execution? Assume all players have distinct names.

The given pseudocode is executed using the “Olympics” table. What will count represent at the end of the execution? Assu
  1. A

    The number of pairs of players having the same nationality or the same medal.

  2. B

    The number of pairs of players having the same nationality and same medal.

  3. C

    The number of players having the same nationality and same medal.

  4. D

    The number of players having the different name but of same nationality.

Show answer

Correct answer

  • B

    The number of pairs of players having the same nationality and same medal.

Question 13

+4 marksOne or more correct options

The given pseudocode is executed using the “Shopping Bills” dataset. frac stores the ratio of the number of customers who purchased both “Bread” and “Milk” to the number of customers who purchased “Milk”. Choose the correct code fragment(s) of procedure hasItem to complete the pseudocode. (Assume there is at least one customer who has purchased “Milk”).

The given pseudocode is executed using the “Shopping Bills” dataset. frac stores the ratio of the number of customers who purchased both “Bread” and “Milk” to the number of customers who purchased “Milk”. Choose the correct code fragment(s) of procedure hasItem to complete the pseudocode. (Assume there is at least one customer who has purchased “Milk”).

The given pseudocode is executed using the “Shopping Bills” dataset. frac stores the ratio of the number of customers wh

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 14

+4 marksOne or more correct options

The given information represents a "Words" dataset and it may have some mistakes with respect to the sanity of data. Identify all rows with such mistakes.

The given information represents a "Words" dataset and it may have some mistakes with respect to the sanity of data. Identify all rows with such mistakes.

The given information represents a "Words" dataset and it may have some mistakes with respect to the sanity of data. Ide

Select all that apply.

  1. A

    Row 1: Incorrect data type of card number

  2. B

    Row 2: Incorrect data type of Word

  3. C

    Row 3: Incorrect data type of Part of Speech

  4. D

    Row 3: Invalid value of Part of Speech

  5. E

    Row 4: Incorrect data type of Letter Count

  6. F

    Row 4: Invalid value of Letter Count

Show answer

Correct answers

  • A

    Row 1: Incorrect data type of card number

  • B

    Row 2: Incorrect data type of Word

  • F

    Row 4: Invalid value of Letter Count

Question 15

+4 marksOne or more correct options

The following pseudocode is executed using the “Scores” dataset. At the end of the execution, count captures the number of pairs of students having either same gender or from the same city but not both. But 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.

The following pseudocode is executed using the “Scores” dataset. At the end of the execution, count captures the number of pairs of students having either same gender or from the same city but not both. But 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.

The following pseudocode is executed using the “Scores” dataset. At the end of the execution, count captures the number

Select all that apply.

  1. A

    Line 13: Incorrect initialisation of B

  2. B

    Line 18: Incorrect update of B

  3. C

    Line 20: Incorrect condition

  4. D

    Line 21: It should return(0)

Show answer

Correct answers

  • A

    Line 13: Incorrect initialisation of B

  • C

    Line 20: Incorrect condition

Question 16

+3 marksWritten answer

The following pseudocode is executed using a dataset similar to the "Words" dataset, based on the following paragraph. "Surrounded by nature, Susan often takes a stroll, savoring the soothing sounds of chirping birds.Such moments underline the significance of embracing simple joys in life. Rustlings in the trees suggest squirrels beginning their day, searching for sustenance. Surely, the beauty of a sunrise holds unparalleled magic."

The following pseudocode is executed using a dataset similar to the "Words" dataset, based on the following paragraph. "Surrounded by nature, Susan often takes a stroll, savoring the soothing sounds of chirping birds.Such moments underline the significance of embracing simple joys in life. Rustlings in the trees suggest squirrels beginning their day, searching for sustenance. Surely, the beauty of a sunrise holds unparalleled magic." What would be the value of count at the end of the execution of the above pseudocode? Assume that upper case and lower case are ignored during comparison of letters.

The following pseudocode is executed using a dataset similar to the "Words" dataset, based on the following paragraph.
Show answer

A written answer, not marked automatically.