Consider the following conditional code, which returns Boolean values
if $((x>25) \land (y>100))$
return $false$;
else if $((x \le 25) \land (y \le 100))$
return $true$;
else if $((x>25) \land (y \le 100))$
return $false$;
else
return $true$;
Simplify it by filling in the following blank with a single Boolean expression without changing the behaviour of the conditional code.
if $($ ________ $)$
return $true$;
else
return $false$;
Given code returns $false$ when:
$((x>25) \land (y>100))$
or
$((x>25) \land (y \le 100))$
So,
$false = (x>25)$
Therefore, the code returns $true$ when:
$x \le 25$
Hence, the required Boolean expression is:
$x \le 25$
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.