Graded Assignment 2
Due date for this assignment: 2020-10-26, 23:59 IST.
You may submit any number of times before the due date. The final submission will be considered for grading.
Click here to download the PDF version of the Questions.
**********************************************************
Here the below link for Datasets used in week 1.
Click here to view the Data
**********************************************************
Note: Different font styles or punctuation symbols are used as follows
I. Italic + Underline: Steps of the procedure
II. Bold: Variables
III. Italic: A field from dataset
IV. “ ”: A value from dataset or dataset name
3.5 points
The following procedure finds the highest marks in Mathematics scored by a “male” student and a “female” student from the “Scores” dataset. 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 two variables Mmax, Fmax 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 Gender is “M” and Mmax > Mathematics marks then store Mathematics marks in Mmax
Step 6. If Gender is “F” and Fmax > Mathematics marks then store Mathematics marks in Fmax
Step 7. Move the current card to another pile called Pile 2 and repeat from step 3
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
No mistake
3.5 points
What will variables A and B represent after execution of the following procedure on the “Paragraph 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 Letter count > A then store A in B and Letter count in A
Step 6. If Letter count < A and Letter count > B then store Letter count in B
Step 7. Move the current card to another pile called Pile 2 and repeat from step 3
Answers
Answered by
1
Step-by-step explanation:
1)no mistake
2)d
3)none
Similar questions