Computational Thinking week 2 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
- The following procedure is executed using the “Scores” dataset. At the end of the execution, diff stores the difference between the highest and lowest total marks. The programmer may have made mistakes in one or more steps. Identify all such steps (if any). Assume that all the steps not mentioned in options are free from errors. It is a Multiple Select Question (MSQ).
Step 1. Arrange all cards in a single pile called Pile 1
Step 2. Initialize variables max to 0, min to 300, and diff to 0
Step 3. If Pile 1 is empty then go to step 8
Step 4. Read the top card in Pile 1
Step 5. If Total < max then store Total in max
Step 6. If Total < min then store Total in min
Step 7. Move the current card to another pile called Pile 2 and repeat from step 3
Step 8. Update value of diff to (max – min)

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. Increment variable B
Step 6. If Word does not end with a full stop then execute step 9
Step 7. If Word ends with a full stop and B > A then store B in A
Step 8. Re-initialize the variable B to 0
Step 9. Move the current card to another pile called Pile 2 and repeat from step 3
4. The following procedure is executed using “Words” dataset. What will A and B represent at the end of the execution?
Step 1. Arrange all cards in a single pile called Pile 1
Step 2. Maintain two variables A, B and initialize them to 100000
Step 3. If Pile 1 is empty then stop the iteration
Step 4. Read the top card in Pile 1
Step 5. If Mathematics Marks < A, then store A in B and Mathematics Marks in A
Step 6. If Mathematics Marks > A and Mathematics Marks < B, then store Mathematics Marks in B
Step 7. Move the current card to another pile called Pile 2 and repeat from step 3
Step 1. Maintain two variables A and B and initialize them to 101 and “None” respectively
Step 2. If Pile 1 is empty then stop the iteration
Step 3. Read the top card in Pile 1
Step 4. If Physics marks <= A, then store Physics marks in A and store student’s name in B
Step 5. Move the current card to another pile called Pile 2 and repeat from step 2
7. he following procedure is executed using “Scores” dataset. What will X and Y represent at the end of the execution?
Step 1. Arrange all cards in a single pile called Pile 1
Step 2. Maintain variables A, B, Y and Initialize them to 0
Step 3. Maintain a variable X and initialize it to “None”
Step 4. If Pile 1 is empty then stop the iteration
Step 5. Read the top card in Pile 1
Step 6. If the Gender is ‘F’ then add one to A. If A > Y then store A in Y and “Female” in X
Step 7. If the Gender is ‘M’ then add one to B. If B > Y then store B in Y and “Male” in X
Step 8. Move the current card to another pile called Pile 2 and repeat from step 4


