Quiz Space

Computational Thinking Quiz 1: 10 October 2021, Set POD21TE3QZ1QPA (September 2021 term)

Question 1

+3 marksOne correct option

The following pseudocode is executed using the "Shopping Bills" dataset. At the end of execution, A captures the highest "Price" of an item purchased from "Big Bazaar". Choose the correct code fragment to complete the pseudocode.

text
A = 0
while (Pile 1 has more cards) {
Read the top card X in Pile 1
if (X.ShopName == "Big Bazaar") {
temp = findItem(X)
if (temp > A) {
A = temp
}
}
Move X to Pile 2
}
Procedure findItem (Y)
maxPrice = 0
while (Card Y has more items) {
********************
* Fill the code *
********************
}
return (maxPrice)
End findItem
  1. A
  2. B
  3. C
  4. D

Question 2

+3 marksOne correct option

A long word is defined as a word having at least 6 letters. The given pseudocode is used to find the average number of letters per word for long words from the "Words" dataset. Choose the correct code fragment to complete the pseudocode.

text
letterCount = 0, wordCount = 0, avgLetPerWord = 0
While (Table 1 has more rows) {
Read the first row X in Table 1
********************
* Fill the code *
********************
}
avgLetPerWord = letterCount / wordCount
  1. A
  2. B
  3. C
  4. D

Question 3

+3 marksOne correct option

The following pseudocode is executed using the "Library" dataset. What will count represent at the end of execution?

text
A = 0, count = 0
while (Pile 1 has more cards) {
Read the top card X from Pile 1
if (X.Year > A) {
A = X.Year
}
Move X to Pile 2
}
while (Pile 2 has more cards) {
Read the top card Y from Pile 2
if (Y.Year == A) {
count = count + 1
}
Move Y to Pile 1
}
  1. A

    Number of authors who published a book in the most recent year

  2. B

    Number of authors who published maximum number of books

  3. C

    Number of books published in the most recent year

  4. D

    Maximum number of books published by an author

  5. E

    None of these

11 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the Computational Thinking (CT) Quiz 1 10 Oct 2021 Set POD21TE3QZ1QPA paper

The IIT Madras BS Computational Thinking (Computational Thinking (CT)) Quiz 1 paper sat on 10 Oct 2021, in the September 2021 term, set POD21TE3QZ1QPA: 14 questions for 50 marks in 120 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureComputational Thinking (CT) Quiz 1 10 Oct 2021 Set POD21TE3QZ1QPA at a glance
TermSeptember 2021 term
SubjectComputational Thinking
Course codeBSCS1001
Questions14
Marks50
Duration120 min
MCQ12
MSQ2
Negative markingNo negative marking.
Updated

Other sets that day

Same Quiz 1, other subjects

More Computational Thinking (CT)