What will variable X represent after execution of the following procedure on the “Shopping Bills” dataset? – Students Community https://iitmadrasstudentscommunity.me IITM Student Community is created to help students to get better grades in their final examinations by providing Course lectures, Graded Assignment Solutions Wed, 09 Aug 2023 15:57:07 +0000 en-US hourly 1 https://iitmadrasstudentscommunity.me/wp-content/uploads/2023/08/cropped-logo-IITM-190-×-100-px-5-150x150.png What will variable X represent after execution of the following procedure on the “Shopping Bills” dataset? – Students Community https://iitmadrasstudentscommunity.me 32 32 CT Week 1 Graded Assignments IIT Madras https://iitmadrasstudentscommunity.me/ct-week-1-graded-assignments-iit-madras/ https://iitmadrasstudentscommunity.me/ct-week-1-graded-assignments-iit-madras/#respond Wed, 09 Aug 2023 07:01:55 +0000 https://iitmadrasstudentscommunity.me/?p=437 Read More »CT Week 1 Graded Assignments IIT Madras]]>

Computational Thinking week 1 graded assignment Complete  Solutions Are Discussed In This Blog. We Hope This Might Help You All In Matching Answers . Or For Some Others Reasons If Not Able To Complete Graded Assignments 

What will be the values of A, B and C after execution of the following procedure using the “Scores” dataset?
Step 1: Arrange all cards in a single pile called Pile 1
Step 2: Maintain three variables A, B, C and initialize them to 0
Step 3: If Pile 1 is empty then stop the iteration
Step 4: Read the top card in Pile 1
Step 5: If Mathematics < 50 then increment A
Step 6: If Physics < 50 then increment B
Step 7: If Chemistry < 50 then increment C
Step 8: Move the current card to another pile called Pile 2 and repeat from step 3
  1. The value of A is  2  

  2. The value of B is  1  

  3. The value of C is  1   

 
4.What will variable B represent after execution of the following procedure on the “Words” dataset?

Step 1: Arrange all cards in a single pile called Pile 1
Step 2: Maintain two variables A, B and initialize them to 0
Step 3: If Pile 1 is empty then stop the iteration
Step 4: Read the top card in Pile 1
Step 5: If PartOfSpeech is “Verb” then increment A
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 A is greater than 1 then increment B
Step 8: Reset the variable A to 0
Step 9: Move the current card to another pile called Pile 2 and repeat from Step 3

 
 
 
5. A student proposed a hypothesis that less number of students are born in the first half of the year than the second half of the year. She wrote the following procedure which uses the “Scores” dataset to verify the hypothesis. However, the procedure may contain some errors. Find out the errors if present.
Step 1: Arrange all cards in a single pile called Pile 1
Step 2: Maintain two variables A and B and initialize them to 0
Step 3: If Pile 1 is empty then stop the iteration and start from Step 8
Step 4: Read the top card in Pile 1
Step 5: If the Date of Birth is from 1st January to 30th June then increment A
Step 6: If the Date of Birth is from 1st July to 31st December then increment B
Step 7: Move the current card to another pile called Pile 2 and repeat from Step 3
Step 8: If A > B then declare the hypothesis to be True
Step 9: If A ≤ B then declare the hypothesis to be False
 
 
 
6. What will variable X represent after execution of the following procedure on the “Shopping Bills” dataset?
Step 1: Arrange all cards in a single pile called Pile 1
Step 2: Maintain four variables A, B, C, X and initialize them to 0
Step 3: If Pile 1 is empty then stop the iteration and start from Step 9
Step 4: Read the top card in Pile 1
Step 5: If the Shop name is “SV Stores” and Customer name is “Suresh” then set A equal to 1
Step 6: If the Shop name is “Big Bazaar” and Customer name is “Suresh” then set B equal to 1
Step 7: If the Shop name is “Sun General” and Customer name is “Suresh” then set C equal to 1
Step 8: Move the current card to another pile called Pile 2 and repeat from Step 3
Step 9: Update the value of X as X = A + B + C
 
 
7. The following procedure is executed using the “Olympics” dataset.

Step 1: Arrange all cards in a single pile called Pile 1
Step 2: Maintain a variable X and initialize it to True
Step 3: If Pile 1 is empty then stop the iteration
Step 4: Read the top card in Pile 1
Step 5: If the Gender is “F” and Nationality is “Korean” then set X equal to False
Step 6: Move the current card to another pile called Pile 2 and repeat from step 3

At the end of the execution, X will be True if

 
 
 
8. The following procedure is executed using the “Library” dataset. At the end of the execution, count stores the number of books written by “Shakespeare” and published in “Morning Star” publications. 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 1: Arrange all cards in a single pile called Pile 1
Step 2: Maintain a variable count and initialize it to 1
Step 3: If Pile 1 is empty then stop the iteration
Step 4: Read the top card in Pile 1
Step 5: If Author == “Shakespeare” or Publisher == “Morning Star” then increment count
Step 6: Move the current card to another pile called Pile 2 and repeat from step 3
 
 
 
9. The following procedure is executed using the “Olympics” dataset. At the end of the execution, count stores the number of Indian players who have won a “Gold” medal. But the programmer has missed few Steps. Identify all correct Steps.
 
Step 1: Arrange all cards in a single pile called Pile 1
Step 2: Maintain a variable count and initialize it to 0
Step 3: ______________________________________
Step 4: Read the top card in Pile 1
Step 5: _______________________________________
Step 6: Move the current card to another pile called Pile 2 and repeat from Step 3
 

]]>
https://iitmadrasstudentscommunity.me/ct-week-1-graded-assignments-iit-madras/feed/ 0