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 2 #10

Open essepuntato opened 4 years ago

essepuntato commented 4 years ago

What is the boolean value of "spam" not in "spa span sparql" and not ("egg" > "span")?

ereuhl commented 4 years ago
"spam" not in "spa span sparql" and not ("egg" > "span")
         True                  and not ("egg" > "span")
         True                  and not (    False     )
         True                  and     True
                         True
Vince2992 commented 4 years ago

Ex2

arimuti commented 4 years ago

image

FrancescoFernicola commented 4 years ago

"spam" not in "spa span sparaql" and not ("egg" > "span")= ="spam" not in "spa span sparaql" and not (False)= ="spam" not in "spa span sparaql" and True= =True and True= =True

virginiaciambriello commented 4 years ago

"spam" not in "spa span sparql" and not ("egg > "span") True and not (False) True and True True

essepuntato commented 4 years ago

@arimuti, it is not clear the various values that are assumed by the expressions at each passage. Could you please be more explicit?

morinigiu commented 4 years ago

"spam" not in "spa span sparql" and not ("egg" > "span")

True and not False

True and True

True

giuliamanganelli commented 4 years ago

"spam" not in "spa span sparql" and not ("egg" > "span")

True and not False

True and True

True