(Problem 2) Compute all of the following in one script. Suppose a Program had four numerical variable: Wi X, Y and Z @ D
-
- Site Admin
- Posts: 899559
- Joined: Mon Aug 02, 2021 8:13 am
(Problem 2) Compute all of the following in one script. Suppose a Program had four numerical variable: Wi X, Y and Z @ D
e compute the Same Boolean expression above using the values from Part (d) first by hand. Then, to Confirm Your answer. Compute the expression in the Sexupt, and assign the result to the variable result 2. Maw Consider the following Boolean expression: Y=o or(x7 y or <z) or WZ and Zcy First, use the variable values from Part (d) above to evaluate by hand (don't turn in Then, to confirm you answer evaluate the expression in the Senft, assigning the result to variable! result 3. Consider Boolean expression X==3|| X = = lo choose the expression below that is equivalent and in the code below Set the number next to your choise to variable, resultu. Note : Since the given expression is in terms of one variable, you may find it helpful to Sketch this set on a number line, as well os each of the 5 Sets below, to help identify equivalent Sets X<311x738&X<loll xlo @n(X<3||X73&&x<loll X70) < X<311355XSoll XZ 10 On(X<31135X10 TX71) ☺n (X==3&& X ==lo) W Consider the Boolean expression:-(X>=-3&&XC3) Choose the exPrisson below that is equivalent, and, in the script below. Set the number next to your choise to Variable Yesult 5
Wotel Since the gwen expression is in terms of one Valable You may find it helps to Skatch this set on a number line as well as each of the 4 Sets below. to help identify equivalent Sets. OX5-3.11 X7 :3 2X<-38% X=3 3 (x >=-3)&&&<3) (X- 3-(X73) consider the Boolean expression: 77=0&&XSI Choose the expression below that is equivalent and in the script below Set the number next to your choice to variable, results. Dysoll X=1 Om(YCSIT (X=1) 350&&X=1) (Yoll X>=D consider the Boolean expression: Xmoll Y= = 2 Choose the expression below the is equivalent, and in the script below Set the number next to your choice to Variable Yesu+7 OX==0&& Yu=2 (X==0)&&(n=2) 3~ (x = =0&& Y~=2) (Xuso) ||-(Y= =2)