phillippa Jame wrote:Hi I am confused about something I'm working on. I have rewritten the problem to ask for help as I'm not sure how you define a logical expression/expression.
Of the following examples, which are considered logical expressions?
1.
2.
3.
Thanks if anyone could explain if there is a difference.
MySQL Blog
http://mysqlearner.blogspot.com/
phillippa Jame wrote:Thanks guys - the way my textbook defined "logical expression" was as "an expression that evaluates to a boolean value"
However throughout the textbook, they only gave examples like: (5>2)
Jeff Verdegan wrote:X ? A : B (note that A and B can be of any type)
Bear Bibeault wrote:
Jeff Verdegan wrote:X ? A : B (note that A and B can be of any type)
This one isn't technically correct unless A and B are booleans, as it will resolve to the type of A and B (which must be of the same type).
No, you are mistaken there.Zeeshan Sheikh wrote: . . . So all of your examples are logical expressions.
That is a proposition, which can be true or false. If you go out in the fresh air and get wet, then that proposition is probably true!It is raining.
It is raining and I have got my umbrella.
[But the answer, yes or not, in that context is a logical proposition.]Is it raining?
. . . although an explanation like “because it is raining” contains a logical proposition.Come and play indoors.
Consider Paul's rocket mass heater. |