From 19589450538f51f4b8dd6bf958431adc2838fdea Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Tue, 18 Feb 2025 15:25:58 +0100 Subject: [PATCH] added ex 1.2 --- src/Lesson1/ex_1.2.sc | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/Lesson1/ex_1.2.sc diff --git a/src/Lesson1/ex_1.2.sc b/src/Lesson1/ex_1.2.sc new file mode 100644 index 0000000..0f09836 --- /dev/null +++ b/src/Lesson1/ex_1.2.sc @@ -0,0 +1,13 @@ +def and(a: Boolean, b: Boolean): Boolean = if (a) b else false + +def or(a: Boolean, b: Boolean): Boolean = if (a) true else b + +and(false, false) +and(false, true) +and(true, false) +and(true, true) + +or(false, false) +or(false, true) +or(true, false) +or(true, true) \ No newline at end of file