Lichen

tests/logical.py

315:fc6b2c837042
2016-12-05 Paul Boddie Added/fixed various comments in the tests.
     1 def f(a, b, c):     2     return a and b and c     3      4 def g(a, b, c):     5     return a or b or c     6      7 def h(a, b, c):     8     return a and b or c     9     10 def i(a, b, c):    11     return a or b and c    12     13 def j(a, b, c):    14     return f(a, b, c) and g(a, b, c) or c    15     16 print f(0, 0, 0) # 0    17 print f(1, 0, 1) # 0    18 print f(1, 1, 1) # 1    19 print g(0, 0, 0) # 0    20 print g(1, 0, 0) # 1    21 print g(0, 0, 1) # 1    22 print h(0, 0, 0) # 0    23 print h(0, 0, 1) # 1    24 print h(1, 0, 0) # 0    25 print i(0, 0, 0) # 0    26 print i(0, 0, 1) # 0    27 print i(1, 0, 0) # 1    28 print j(0, 0, 0) # 0    29 print j(0, 0, 1) # 1    30 print j(1, 0, 0) # 0