comp-think / 2019-2020

The GitHub repository containing all the material related to the Computational Thinking and Programming course of the Digital Humanities and Digital Knowledge degree at the University of Bologna (a.a. 2019/2020).
Other
12 stars 3 forks source link

Lecture "Programming languages", exercise 1 #9

Open essepuntato opened 4 years ago

essepuntato commented 4 years ago

What is the boolean value of not (not True or False and True) or False?

ereuhl commented 4 years ago

Since the order in which the operators have to be evaluated is first NOT, then AND, then OR and what is inside the bracket has to be evaluated first, this is my result:

not (not True or False and True) or False
not ( False   or False and True) or False
not ( False   or      False    ) or False
not          False               or False
      True                       or False
                   True
Vince2992 commented 4 years ago

Ex1

arimuti commented 4 years ago

image

FrancescoFernicola commented 4 years ago

not (not True or False and True) or False= =not (False or False and True) or False= =not (False or False) or False= =not (False) or False= =True or False= =True

virginiaciambriello commented 4 years ago

not (not True or False and True) or False not (False or False and True) or False not (False or False) or False not False or False True or False True

morinigiu commented 4 years ago

not (not True or False and True) or False

not (False or False and True) or False

not (False or False) or False

not False or False

True or False

True

giuliamanganelli commented 4 years ago

not (not True or False and True) or False

not (False or False and True) or False

not (False or False) or False

not False or False

True or False

True