graded assignment w3 ques 3

70 views
Skip to first unread message

greet loop

unread,
Nov 1, 2020, 11:01:55 AM11/1/20
to Discussion forum for Computational Thinking
Hi,
Kindly do correct me, but I realize there are 2 options which are correct in this question, but this question is single select. may cause confusion in answering!

Regards,
rajat.

AC

unread,
Nov 1, 2020, 11:09:42 AM11/1/20
to Discussion forum for Computational Thinking, greet loop
Hi,

No.  Only one of the option's right.
I wish I could help you with more info, but guess I'll stick to protocols for graded assignment here.
Hope you get it right.
All the best!

Anirban

greet loop

unread,
Nov 1, 2020, 11:13:49 AM11/1/20
to Discussion forum for Computational Thinking, AC, greet loop
Hi, 
sure, lets discuss after deadline.

greet loop

unread,
Nov 4, 2020, 6:41:20 AM11/4/20
to Discussion forum for Computational Thinking, greet loop, AC


when we are inside the " if (x.total<avgT) " condition:
Then I assume The marks in any 1 subject is already lesser than average mark in that subject.
i.e Among inner 3 if conditions, Any one must be true. Hence SubC can never be 0. It can be 1 or 2 or 3.


So we reach our block of "fill the code", which is inside the parent if block, then for option (a) :
'''if (SubC <= 1){
countBA = countBA +1}'''

The SubC  can either 0 or 1, but as we are already inside parent if condition hence, subC must not be 0. That is for required case 
subC would be 1.  i.e As (SubC < = 1) is the same as SubC == 1 because SubC cannot be 0 as the X.total is less than average_total score in a card X.

Regards.
Reply all
Reply to author
Forward
0 new messages