Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lecture "Programming languages", exercise 1 #10

Open
essepuntato opened this issue Oct 20, 2023 · 24 comments
Open

Lecture "Programming languages", exercise 1 #10

essepuntato opened this issue Oct 20, 2023 · 24 comments
Labels

Comments

@essepuntato
Copy link
Contributor

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

@vattelalberto
Copy link

True

@qwindici
Copy link

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

@FranciscoWu
Copy link

True

@annapasetto0
Copy link

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

@Asemica-me
Copy link

null (7)
According to brackets and rules for application order, the boolean value of not (not True or False and True) or False is True.

@frammenti
Copy link

frammenti commented Oct 21, 2023

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

@alicepiazzi
Copy link

Schermata 2023-10-21 alle 12 29 39

@Liber-R
Copy link

Liber-R commented Oct 21, 2023

True

@Chiaramartina
Copy link

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

@rufferbaraldi
Copy link

True

@matildepassafaro
Copy link

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

@saramadonia
Copy link

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

@ThIheb
Copy link

ThIheb commented Oct 22, 2023

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

@valentinabertelli
Copy link

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

@AnnaNicoletti
Copy link

image

@MariaFrancesca6
Copy link

MariaFrancesca6 commented Oct 22, 2023

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

Correct way to solve it:

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

@enricabruno
Copy link

Screenshot 2023-10-22 alle 23 45 09

@elena2notti
Copy link

True

@essepuntato
Copy link
Contributor Author

Hi all, thanks for your take. It is important to remember that boolean operators must be applied with a particular priority among them, i.e. first not, then and and finally or.

@Kaosaier
Copy link

not True is False.
not False is True.
False and True is False.
not (not True or False and True) is not (False or False), which is equivalent to not False, which is True.
True or False is True.
Therefore, is True.

@saramadonia
Copy link

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

edit:
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

@simocasaz
Copy link

IMG_20231025_193635.jpg

@parkful
Copy link

parkful commented Nov 1, 2023

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

@CarlaMenegat
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests