Quiz Space

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

Question 9: The following pseudocode is executed using the “Scores” d…

Question 9

+3 marksOne correct option

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

text
1 A = 0
2 while(Pile 1 has more cards){
3 Read the top card X from Pile 1
4 A = A + isInSeq(X)
5 Move X to Pile 2
6 }
7
8 Procedure isInSeq(X)
9 if(X.Mathematics > X.Physics){
10 if(X.Chemistry < X.Mathematics){
11 return(1)
12 }
13 }
14 return(0)
15 End isInSeq
  1. A

    Number of students with highest marks in Mathematics among the three subjects

  2. B

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

  3. C

    Number of students with highest marks in Chemistry among the three subjects

  4. D

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

Show answer

Correct answer

  • A

    Number of students with highest marks in Mathematics among the three subjects

Question 9 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. Q8The following pseudocode is executed using the “Library” dataset. What will B represent at the end of 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.\…