mock test

62 views
Skip to first unread message

Harshit Sharma

unread,
Nov 18, 2020, 11:44:36 PM11/18/20
to Discussion forum for Computational Thinking
Dear Sir/mam,
in que. no. 1st why last option is correct, as in option it is written that we count the no. of students of marks are grater than 80 + no. of male student of x.total is at most 80.
But, I think that we also count the male students of marks less then 80 as we have the condition x.gender ==male  
I also saw the pdf solution but I did not get the satisfaction 
Message has been deleted

Computational Thinking Support 2

unread,
Nov 18, 2020, 11:58:49 PM11/18/20
to Discussion forum for Computational Thinking, Harshit Sharma
At most 80 means not greater than 80, which means students having marks less than 80. Its an OR operator. So all the male students satisfy the if condition irrespective of the mark.

Regards
Nijin
IITM Online Degree Programme

Dhiman Sengupta

unread,
Nov 19, 2020, 12:39:27 AM11/19/20
to Computational Thinking Support 2, Discussion forum for Computational Thinking, Harshit Sharma
Hi CT team,

I sent couple of mail to you for more clarification on the data set which was pertinent to this qs.

I agree the solution you provided was inline with the pseuocode.

My only qs, while solving such psedo code do we need to consider that dataset is  mixer of both male and female candidates and not just look the all possible output of  pseudo code.

Coz if the dataset contains only male candidate then 2nd IF condition doesn't make any sense. We we return all male candidates.

Please respond. 

--
You received this message because you are subscribed to the Google Groups "Discussion forum for Computational Thinking" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cs1001-discus...@nptel.iitm.ac.in.
To view this discussion on the web visit https://groups.google.com/a/nptel.iitm.ac.in/d/msgid/cs1001-discuss/756a8949-e5ae-4a13-8234-5bc34acaf4d9n%40nptel.iitm.ac.in.
Reply all
Reply to author
Forward
0 new messages