Quiz Space

Computational Thinking · Quiz 2 · 12 Apr 2026 · January 2026 term

Question 3: The following pseudocode is executed using the "Words" da…

Question 3

+4 marksOne correct option

The following pseudocode is executed using the "Words" dataset and explode(X) returns the list of letters in the word X. For example explode("apple") will return ['a', 'p', 'p', 'l', 'e']. What will cnt represent at the end of the execution? Note: isVowel(c) returns True if c is a vowel, False otherwise. isConsonant(c) returns True if c is a consonant, False otherwise.

The following pseudocode is executed using the "Words" dataset and explode(X) returns the list of letters in the word X.
  1. A

    Number of words with at least one vowel followed immediately by another vowel.

  2. B

    Number of words with at least one consonant followed immediately by a vowel.

  3. C

    Number of words with at least one vowel followed immediately by a consonant.

  4. D

    Number of words where the first letter is a vowel and the last is a consonant.

Show answer

Correct answer

  • C

    Number of words with at least one vowel followed immediately by a consonant.

Question 3 of 14 in the IIT Madras BS Computational Thinking (Computational Thinking (CT)) Quiz 2 paper sat on 12 Apr 2026, in the January 2026 term (CT 06 Apr 26). It carries 4 marks.

More questions from this paper

  1. Q1Figure question
  2. Q2What will be the value of outList at the end of execution of the given pseudocode?
  3. Q4The following pseudocode is executed using the "Scores" dataset. What will the values of A and B represent at the end o…
  4. Q5Use the procedure doSomething given below. The following pseudocode is executed using the Words dataset and the procedu…
  5. Q6The following pseudocode is executed on the "Shopping Bills" dataset. What will Val represent at the end of the executi…
  6. Q7We have a dictionary Registration where the keys are student names and the values are lists of courses they have regist…
  7. Q8Two players play a game with dice. The results are stored in dieRolls, a list of pairs where each pair represents a rol…
  8. Q9Let SortedL be a list of integers sorted in ascending order. The procedure deleteVal(SortedL, X) is supposed to delete …
  9. Q10Let Z be a row in the Words table such that Z.Word = "reluctant". What will be the value of alphaDict['t'] at the end o…
  10. Q11The following procedure is executed on dictionary D: D = { 'A': 10, 'B': 25, 'C': 30, 'D': 40, 'E': 18 } What is the fi…
  11. Q12The following pseudocode is executed using the "Olympics" dataset. TeamDict is a dictionary accumulating player names f…
  12. Q13The following pseudocode is executed using the "Olympics" dataset. TeamDict is a dictionary accumulating player names f…
  13. Q14The following pseudocode is executed using the "Olympics" dataset. TeamDict is a dictionary accumulating player names f…