DOUBT!!!!

43 views
Skip to first unread message

muditt...@gmail.com

unread,
Nov 9, 2020, 6:14:55 AM11/9/20
to Discussion forum for Computational Thinking
doubt 16.PNG
PLEASE HELP ME WITH THIS ONE???
THANKS..

Computational Thinking Support 2

unread,
Nov 9, 2020, 8:42:11 AM11/9/20
to Discussion forum for Computational Thinking, muditt...@gmail.com
Hi,

In Code-block 1
It will return True only for case when both have same DoB and for rest of  two cases (before and after) it will return False.
In Code-block 2
It will return False when DoBs are not same which can be of two cases (before and after) and otherwise it will return True which means for same DoB.

So when we see the return value for both code-blocks they actually have same result but using different implementation.

I hope you will understand the above explanation if not please write us again.

Regards,
Deepak
IITM Online Degree Team

Saurabh Patil

unread,
Nov 9, 2020, 8:47:07 AM11/9/20
to Discussion forum for Computational Thinking, muditt...@gmail.com
Here in this question our main aim to find whether the output from  these two code-blocks are same or not 
So as you can see that in code-block:1 if the date of birth of student X is same as of Student Y  then it should return TRUE if not False 
But when you carefully observe the code-block:2  if the date of birth of student X is not  same as of Student Y   then it should return False  else TRUE 
So Finally both code-blocks are giving the Same Output as the end result .

On Monday, November 9, 2020 at 4:44:55 PM UTC+5:30 muditt...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages