Indian Institute of Technology Madras
BS Degree Programme · Examination & Study Paper
BSCS1001 · Computational Thinking
End Term · 22 Dec 2024 (Forenoon)
Examination Instructions & Guidelines
- Solve on notebook/paper first before checking solutions.
- MCQ: Exactly 1 option is correct. Negative marking applies.
- MSQ: One or more options correct. Select all to score.
- NAT: Numerical response. No negative marking.
- Scientific calculator allowed for all calculations.
- Official answer key is sealed at the end of this sheet.
- Q1MCQ5 Marks·Choose one option

- A6
- B9
- C8
- D1
- Q2MCQ5 Marks·Choose one option

- AIf L1 = [2, 3, 5], L2 = [2, 4, 5], then CompareLists[L1, L2] returns true.
- BIf L1 = [2, 4, 5], L2 = [5, 4, 2], then CompareLists[L1, L2] returns true.
- CIf L1 = [2, 4, 5], L2 = [2, 5, 4], then CompareLists[L1, L2] returns true.
- DIf L1 = [2, 4, 5], L2 = [2, 4, 5], then CompareLists[L1, L2] returns true.
- Q3MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q4MCQ5 Marks·Choose one option

- A

- B

- C

- D

- A
- Q5MCQ6 Marks·Choose one option

- ANumber of students from the cities with the average total marks of the city more than the average total marks of the dataset.
- BNumber of students from the cities with the average total marks of the city less than the average total marks of the dataset.
- CNumber of cities with the average total marks less than the average total marks of the dataset.
- DNumber of cities with the average total marks more than the average total marks of the dataset
- Q6MSQ6 Marks·Choose all correct options

- AA represent the number of sentences in the "Words" dataset
- BA represent the number of words in the "Words" dataset
- CoutList represent list of lists of last and first word of each sentence in that order.
- DoutList represent list of lists of first and last word of each sentence in that order.
- Q7MSQ6 Marks·Choose all correct options

- A

- B

- C

- D

- A
- Q8MSQ6 Marks·Choose all correct options
The given pseudocode is executed using the “Words” dataset. At the end of execution A captures the frequency count of the most frequent vowel in the dataset. But the pseudocode may have mistakes. Identify all such mistakes (if any). Assume that all statements not listed in the options below are free of errors. It is a Multiple Select Question (MSQ).

- ALine 1: Incorrect initialization of D
- BLine 8: Incorrect conditional expression
- CLine 9: A updated with wrong value
- DLine 13: Incorrect initialization of i
- ELine 16: Conditional expression should not use "not" operator
- FLine 22: i updated at wrong place
- Q9MSQ5 Marks·Choose all correct options
Consider the graph given below.
Which of the following statements is/are true?- AThere are 4 cliques of size three present in the graph.
- BThe nodes 0, 11, 6 and 12 form a clique of size four.
- CThe maximum size of clique that appears in the graph is 3.
- DThe nodes 0 and 5 form a clique of size two.
- Q10MSQ5 Marks·Choose all correct options
Which of the following statements is/are true?- AC will be true, if there exist more fiction books than non-fiction books.
- BB represents number of non-fiction books.
- CA represents number of fiction books.
- DC will be true, if there exist more fiction books than non-fiction English books
- Q11MSQ4 Marks·Choose all correct options
Let D be a non-empty dictionary. Choose the correct option(s). It is a Multiple Select Question(MSQ).
- A

- B

- C

- D

- A
- Q12MSQ4 Marks·Choose all correct options

- AN represents minimum number of bills issued to a single customer.
- Bcount represents number of customers.
- CA represents maximum number of bills issued to a single customer.
- DIf we replace line 16 with N = N + 1, then N represents number of bills issued to a single customer.
- Q13NAT5 Marks·Write the number
Your answer: - Q14NAT5 Marks·Write the number
The given pseudocode is executed using a dataset having the same fields as the “Words” dataset, and contains the following words: "The experience was simply wonderful. The product quality is fantastic, and I would definitely recommend it to others. It is not only affordable but also has an excellent design. Overall, I believe it is a great choice for anyone looking for a reliable product." Consider the following information: 1. unique(L) returns a list of unique elements of list L. For example unique(["think", "like", "toppers", "think"]) will return ["think", "like", "toppers"]. 2. comNo(L1, L2) returns the number of common elements in lists L1 and L2. 3. Ignore the upper and lower case, and punctuation symbols while comparing with other words.
What will the value of posSen be at the end of the execution of the above pseudocode?Your answer: Read the passage below, then answer Q15–Q16
Q15MCQ4 Marks·Choose one optionThere is an edge between students i and j, with i != j, if and only if:
- Athey are from the same city/town
- Bthey have the same gender
- Cthey are from the same city/town and have the same gender
- Dthey are from the same city/town or have the same gender
- Q16MSQ5 Marks·Choose all correct options
Which of the following statements is/are true? It is a Multiple Select Question (MSQ).
- Alast(A[01]) represent the gender of the student having sequence number 01.
- Brest(A[01]) represent the gender of the student having sequence number 01.
- CIn a graph, all students in a given clique are from the same city/town
- DIf B[x][y] =1 and B[y][z] = 1, then B[x][z] = 1.
Read the passage below, then answer Q17–Q18

Based on the above data, answer the given subquestions.
Q17NAT5 Marks·Write the number
Your answer:- Q18NAT4 Marks·Write the number
Your answer: Read the passage below, then answer Q19–Q20

Based on the above data, answer the given subquestions.
Q19MCQ5 Marks·Choose one optionConsider the below pseudocode

- Ap = 0, q = 0
- Bp = 1, q = 0
- Cp = 0, q = 1
- Dp = 1, q = 1
- Q20MCQ5 Marks·Choose one option

- A0
- B1
- C2
- D3