AQ4.5: Activity Question 5 - Not graded

66 views
Skip to first unread message

Wineelwilson Dasari

unread,
Nov 9, 2020, 9:18:53 PM11/9/20
to Discussion forum for Computational Thinking
Hello Mam/Sir.

Could you explain me how it was option 3 for the following question.



With regards, 
Wineel.

Wineelwilson Dasari

unread,
Nov 9, 2020, 9:20:10 PM11/9/20
to Discussion forum for Computational Thinking, Wineelwilson Dasari
 

Wineelwilson Dasari

unread,
Nov 9, 2020, 9:22:32 PM11/9/20
to Discussion forum for Computational Thinking
image.png

Anand Iyer

unread,
Nov 10, 2020, 12:13:18 AM11/10/20
to Discussion forum for Computational Thinking, wineel1...@gmail.com
If M was more than N, procedure isLeftHeavy (M, N) would have returned True.  Since it returned False, we know that M is less than or equal to N.

If N was more than M, procedure isLeftHeavy (N, M) would have returned True.  Since it returned False, we know that M is more than N, or equal to N.

Since M cannot be more than and less than N at the same time, they must be equal to each other.

Hope my explanation can be understood.

Computational Thinking Support 2

unread,
Nov 10, 2020, 12:24:35 AM11/10/20
to Discussion forum for Computational Thinking, anandd...@gmail.com, wineel1...@gmail.com
Hi,
Whatever Anand explained is correct but before that you need to think like that for which case of values of M and N we will get the return value True. Now you can follow the cases considered by Anand.
If you still have doubt please write us again.

Regards,
Deepak
IITM Online Degree Team
Reply all
Reply to author
Forward
0 new messages