Quiz Space

Computational Thinking · Qualifier · 13 Apr 2025 · January 2025 term

Question 5: Statement The following pseudocode is executed using the …

Question 5

+4 marksOne correct option

Statement

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.

text
count1 = 0, count2 = 0
while(Table 1 has more rows){
Read the first row X in Table 1
if(....A.... or ....B....){
count1 = count1 + 1
}
else{
count2 = count2 + 1
}
Move X to Table 2
}
  1. A

    A: X.Gender == 'F'
    B: X.Mathematics > X.Physics

  2. B

    A: X.Gender == 'M'
    B: X.Mathematics < X.Physics

  3. C

    A: X.Gender == 'F'
    B: X.Mathematics < X.Physics

  4. D

    A: X.Gender == 'M'
    B: X.Mathematics > X.Physics

Show answer

Correct answer

  • C

    A: X.Gender == 'F'
    B: X.Mathematics < X.Physics

Question 5 of 12 in the IIT Madras BS Computational Thinking (Computational Thinking (CT)) Qualifier paper sat on 13 Apr 2025, in the January 2025 term (IIT M DS REATTEMPT AN EXAM QDQ1 13 Apr 2025). It carries 4 marks.

More questions from this paper

  1. Q1Statement The following pseudocode is executed using the “Library” dataset. What will A represent at the end of executi…
  2. Q2The following pseudocode is executed using the "Scores" table. What will A represent at the end of the execution?
  3. Q3The following pseudocode is executed using the "Words" dataset. At the end of the execution, A captures the maximum let…
  4. Q4Let X be a row in the "Words" dataset. Let isShortVerb be a procedure to find whether the word in the row X is a verb w…
  5. Q6Statement The following pseudocode is executed using the “Words” dataset. The variable count counts the words with part…
  6. Q7Statement The given pseudocode is executed using the "Scores" dataset. There is a hypothesis that if a student performs…
  7. Q8Statement The following pseudocode is executed using the “Scores” dataset. At the end of the execution, A captures the …
  8. Q9Statement The given information represents a "Words" dataset and it may have some mistakes with respect to the sanity o…
  9. Q10Statement The following pseudocode is executed using a dataset similar to the "Words" dataset, based on the following p…
  10. Q11Statement\ The following pseudocode is executed using the “Scores” dataset Based on the above data, answer the given su…
  11. Q12Statement\ The following pseudocode is executed using the “Scores” dataset Based on the above data, answer the given su…