Explanation For 4Q of AQ3.5

229 views
Skip to first unread message

Jessica John Britto

unread,
Nov 9, 2020, 6:38:30 AM11/9/20
to Discussion forum for Computational Thinking
Hi, 

Could somebody please explain me solution of the question below ?

Let us clone the “Scores” dataset and modify it in the following way: for every card in the cloned dataset, we replace the maths marks by hundred minus the current maths marks. That is, we take the maths marks in a card, subtract it from hundred, and then replace the maths marks in the card with this new number. We refer to the maths marks in the cloned dataset as maths-clone. Now, consider the following code:

maxClone = MAX(maths-clone)
max = 100 - maxClone

If this code is executed, what does the variable max store?
 a)  It is the minimum maths marks in the original dataset
 b) It is the maximum maths marks in the cloned dataset
 c) It is the minimum maths marks in the cloned dataset
 d) It is the maximum maths marks in the original dataset


Thanking you in advance, 
Jessica

Anand Iyer

unread,
Nov 10, 2020, 12:34:28 AM11/10/20
to Discussion forum for Computational Thinking, Jessica John Britto
Suppose 100, 90, 80 are the math marks in the set.  For brevity, let's consider only 3 marks cards.

Now, marks in the math-clone set will 0, 10, 20

max(math-clone) will be 20 (maxClone)

Hence, 100 - maxClone is 80

If you look back at the original math marks, this is the same as the minimum marks in the original set.

Hence, the answer.

Computational Thinking Support 2

unread,
Nov 10, 2020, 1:00:58 AM11/10/20
to Discussion forum for Computational Thinking, anandd...@gmail.com, Jessica John Britto
Hi,
Whatever the explanation given by Anand is correct.

If you still have doubt please write us again.

Regards,
Deepak
IITM Online Degree Team

Jessica Britto

unread,
Nov 10, 2020, 2:09:01 AM11/10/20
to Discussion forum for Computational Thinking, anandd...@gmail.com
Thanks
Reply all
Reply to author
Forward
0 new messages