IITM Computational Thinking Graded Assignment Week 1
IITM Computational Thinking Graded Assignment Week 1
Computational Thinking
Graded assignment week 1
Question 1 to 3
Question 1 [2 Marks]
Question 2 [2 Marks]
Question 3 [2 Marks]
Question 4 [4 Marks]
Question 5 [5 Marks]
Question 6 [5 Marks]
Question 7 [5 Marks]
Question 8 [5 Marks]
Question 9 [5 Marks]
Question 10 [5 Marks]
Question 1 to 3
What will be the values of A, B and C after execution of the following procedure using the "Scores"
dataset?
Step 6: If Date of Birth > "30 April" and Date of Birth < "1 September" then increment B
Step 8: Move the current card to another pile called Pile 2 and repeat from step 3
Question 1 [2 Marks]
The value of A is _ _ _ _ ?
Question 2 [2 Marks]
The value of B is _ _ _ _ ?
Question 3 [2 Marks]
The value of C is _ _ _ _ ?
Question 4 [4 Marks]
What will variable A represent after execution of the following procedure on the "Words" dataset?
Step 6: If the Word does not end with a full stop then execute step 9
Step 7: If the Word ends with a full stop and B is equal to 1 then increment A
Step 9: Move the current card to another pile called Pile 2 and repeat from step 3
Question 5 [5 Marks]
The given procedure finds the category which has generated the higher revenue between
"Electronics" and "Stationery" when executed on the "Shopping Bills" dataset. Fill in the blanks
from the given choices and complete the procedure.
Step 2: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Step 3: If Pile 1 is empty then stop the iteration and start from step 8
Step 5: If the bill contains one or more items with Category "Electronics" then add Cost of all such
items to Ecost
Step 6: If the bill contains one or more items with Category "Stationery" then add Cost of all such
items to Scost
Step 7: Move the current card to another pile called Pile 2 and repeat from step 3
Step 8: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
b. Step 2: Maintain two variables Ecost, Scost and initialize them to "None"
d. Step 2: Maintain two variables Ecost, Scost and initialize them to "None"
Step 3: If Pile 1 is empty then stop the iteration and start from step 9
Step 5: If the Shop name is "SV Stores" and Customer name is "Neeraja" then set A equal to 1
Step 6: If the Shop name is "Big Bazaar" and Customer name is "Neeraja" then set B equal to 1
Step 7: If the Shop name is "Sun General" and Customer name is "Neeraja" then set C equal to 1
Step 8: Move the current card to another pile called Pile 2 and repeat from step 3
Question 7 [5 Marks]
The following procedure counts the number of words from the "Words" dataset where Part of
speech is "Noun" and Letter count is greater than or equal to 4. But the programmer may have
made mistakes in one or more steps. Identify all such steps (if any). It is a Multiple Select Question
(MSQ).
Step 5: If Part of speech is "Verb" and Letter count 4 then increment count
Step 6: Move the current card to another pile called Pile 2 and repeat from step 3
(a) Step 1
(b) Step 2
(c) Step 3
(d) Step 4
(e) Step 5
(f) No mistake
Question 8 [5 Marks]
The given information represents a "Shopping Bill" and it may have some mistakes with respect to
the sanity of data. Identify all rows with such mistakes. It is a Multiple Select Question (MSQ).
(a) Row 1
(b) Row 2
(c) Row 3
(d) Row 4
(e) Row 5
Question 9 [5 Marks]
Match the following by selecting the most appropriate datatype.
Question 10 [5 Marks]
Interpret the following flowchart and answer the questions. Let A, B and C be three distinct
integers given as input.
What will X represent at the end of flowchart?