// Exercise 04.01 Boolean logic // // Aim: Understand Boolean operations // // Implement the logical implication using some of the operations and (&&), or (||) et not (!). // The truth table of the implication (=>) is: // // a b => // 0 0 1 // 0 1 1 // 1 0 0 // 1 1 1 function implies(a,b) { // Your code starts after this line result = (!a || b); // Your code ends before this line return result; } // The code below is for automatically checking the result. Please ignore it! res = implies(0,0) && implies(0,1) && !implies(1,0) && implies(1,1); if (res) showMessage("That's right. Great, you did it!"); else showMessage("Your result is wrong! Please check your macro and try again!");