added ex 1.2

This commit is contained in:
Louis Heredero 2025-02-18 15:25:58 +01:00
parent 49b921a814
commit 1958945053
Signed by: HEL
GPG Key ID: 8D83DE470F8544E7

13
src/Lesson1/ex_1.2.sc Normal file
View File

@ -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)