Quiz Space

Computational Thinking · Qualifier · 24 Mar 2024 · January 2024 term

Question 8: The following pseudocode is executed using the “Library” …

Question 8

+3 marksOne correct option

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

text
1 A = 0
2 count = 0
3 while(Table 1 has more rows){
4 Read the first row X in Table 1
5 count = count + 1
6 if(X.Author == "Kalam" and X.Language == "English"){
7 A = A + 1
8 }
9 Move X to Table 2
10 }
11 B = count - A
  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 not written by author Kalam or not in English or both

Show answer

Correct answer

  • D

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

Question 8 of 14 in the IIT Madras BS Computational Thinking (Computational Thinking (CT)) Qualifier paper sat on 24 Mar 2024, in the January 2024 term (IIT M QUALIFIER AN EXAM QDQ1 24 Mar 2024). It carries 3 marks.

More questions from this paper

  1. Q1The given pseudocode is executed using the “Shopping Bills” dataset.frac stores the ratio of the number of customers wh…
  2. Q2The following pseudocode is executed using the "Words" dataset. At the end of the execution, count stores the number of…
  3. Q3The following pseudocode is executed using the “Scores” dataset. Assume that the variable AvgT holds the value of the a…
  4. Q4The following pseudocode is executed using the “Words” dataset. What will A represent at the end of the execution?
  5. Q5Procedure miniSum accepts three numbers as parameters and returns the sum of two smallest numbers.\ Choose the correct …
  6. Q6The following pseudocode is executed using the “Scores” dataset. What will count represent at the end of the execution?
  7. Q7The following pseudocode is executed using the “Olympics” dataset. Procedure doSomething accepts a table of rows that c…
  8. Q9The following pseudocode is executed using the “Scores” dataset. What will A represent at the end of the execution?
  9. Q10The following pseudocode is executed using the “Words” dataset. What will count represent at the end of execution?
  10. Q11The given pseudocode is executed using the “Olympics” table. At the end of execution, count represent the number of pai…
  11. Q12The following pseudocode is executed using the "Scores" dataset. At the end of the execution of the below pseudocode, i…
  12. Q13The given information represents a "Library" dataset and it may have some mistakes with respect to the sanity of the da…
  13. Q14The following pseudocode is executed using a dataset similar to the "Words" dataset, based on the following paragraph.\…