Skip to content

CT Week 2 Graded Assignments IIT Madras

 

00:00 If the Correct Card is found after 11 iterations of Another Card, the Correct Card is the 11th , then what is the value of Count-Cards? (a) 9 (b) 10 (c) 11 (d) 12 00:30 2 points Let’s use the Scores dataset and the Correct Card is the user’s requirement. How many possible score-cards does the iteration go through if the user requirement is found in the First Card and all other cards do not match? (a) 30 (b) 20 (c) 10 (d) 1 01:00 The following procedure finds the minimum marks in Chemistry scored by a Male student from the Scores dataset. However, the programmer may have made mistakes in one or more steps. Identify any such steps (if any). Step 1: Arrange all cards in a single pile called Pile 1 Step 2: Maintain a variable MIN-CHEMISTRY and initialize with first Chemistry SCORE where Gender = M Step 3: If Pile 1 is empty then stop the iteration Step 4: Read the top card of Pile 1 Step 5: If Gender == M and Chemistry ≥ MIN-CHEMISTRY Step 6: Update Chemistry = MIN-CHEMISTRY Step 7: Move the current card to Pile 2 and repeat from step 3 (a) 2 (b) 3 (c) 4 (d) 5 (e) 6 01:30 3 points A programmer has written the following algorithm to find the number of students who are below the Avg- Marks in Scores dataset. He/she committed a mistake. Can you identify it? Step 1: Arrange all cards cards in Pile 1 Step 2: Calculated Average marks are stored into Avg-Marks. Step 3: Initialize Student-Count with 0 Step 4: Stop iteration, when Pile 1 is empty Step 5: Read one top card from Pile 1 Step 6: If Avg-Marks ≤ TOTAL then add value 1 to Student-Count Step 7: Move the current card to Pile 2 and repeat Step 4 (a) Step 4 (b) Step 5 (c) Step 6 (d) Step 7 02:00 The shopping bill dataset contains Shop Names [Big Bazar, SV Stores, Sun General, More Supermarket]. The programmer wants to find out the store-wise minimum bill amount. How many variables are required? 02:30 Assume that there are 5 cards in the Paragraph words dataset [’ It’, ’is’, ’a’, ’rainy’, ’Monday.’]. What is the value of A after the below algorithm is executed? Step 1: Arrange all cards in Pile 1, cards repeated Step 2: Initialize A with 10 Step 3: Stop iteration, when Pile 1 is empty Step 4: Read one top card from Pile 1 Step 5: If A ≥ LetterCount then Update A = LetterCount Step 6: Move the current card Pile 2 and repeat Step 3 03:00 If X is a card from the Shopping Bill dataset. Identify the list of fields that can be accessed through card X (a) X.Item (b) X.Diary/Food (c) X.Qty (d) X.Milk 03:10 Which of the following is the correct pseudocode to find the longest verb length in the Paragraph Words dataset? (a) LongestVerb=NONE MaxVerbLength=0 While (Pile 1 has more cards) 03:20 To find out the Minimum Total Marks in Scores dataset. Recommended initial value of Min-Total-Marks variable (a) 100 (b) 0 (c) 1 (d) 282 01:40 Match the following using the pseudocode concept Column 1 Column 2 a) == i) True b) =ii) Equality c) 56 ≥ 7iii) Assignment (a) a – ii), b – i), c – iii) (b) a – iii), b – i), c – ii) (c) a – ii), b – iii), c – i) (d) a – iii), b – ii), c – i)