Question 2
The given procedure is executed using the "Library" dataset (Table 1).
Procedure selected (auth, gen, num) countT = 0, countG = 0 while (Table 1 has more rows) { Read the first row X from Table 1 if (X.Author == auth) { countT = countT + 1 if (X.Genre == gen) { countG = countG + 1 } } Move X to Table 2 } if (countG / countT ≥ num / 100) { return(True) } return(False)End selectedselected("Narayan", "Fiction", 10) will return True if
Question 3
miniSum accepts three numbers as parameters and returns the sum of two least parameters. Choose the correct code fragment to complete the procedure.
Procedure miniSum(A, B, C) Sum = 0 if (A > C and A > B) { Sum = B + C } ******************** * Fill the code * ******************** return (Sum)End miniSum11 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 30 Jan 2022 Set QPB1 paper
The IIT Madras BS Computational Thinking (Computational Thinking (CT)) Quiz 1 paper sat on 30 Jan 2022, in the January 2022 term, set QPB1: 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.
| Feature | Computational Thinking (CT) Quiz 1 30 Jan 2022 Set QPB1 at a glance |
|---|---|
| Term | January 2022 term |
| Subject | Computational Thinking |
| Course code | BSCS1001 |
| Questions | 14 |
| Marks | 50 |
| Duration | 120 min |
| MCQ | 10 |
| MSQ | 4 |
| Official paper | IIT M FOUNDATION QUIZ EXAM QPB2 30 Jan 2022 |
| Negative marking | No negative marking. |
| Updated |