Difference between revisions of "CSC103: DT's Notes 1"
Line 526: | Line 526: | ||
</tanbox> | </tanbox> | ||
<br /> | <br /> | ||
− | [[ | + | [[File:IceCreamCup3Balls.png|right|200px]] |
We can devise three boolean variables that can be true of false depending on three properties of a container of ice cream: ''choc'', ''fruit'', and ''HG''. ''choc'' is true if the ice cream contains some chocolate. ''fruit'' is true if the ice cream contains fruits, and ''HG'' is true if the ice cream is from Haagen Dazs. A boolean function, or expression, we're going to call it ''isgood'', containing ''choc'', ''fruit'', and ''HG'' that turns true whenever the ice cream is one our friend will like would be this: | We can devise three boolean variables that can be true of false depending on three properties of a container of ice cream: ''choc'', ''fruit'', and ''HG''. ''choc'' is true if the ice cream contains some chocolate. ''fruit'' is true if the ice cream contains fruits, and ''HG'' is true if the ice cream is from Haagen Dazs. A boolean function, or expression, we're going to call it ''isgood'', containing ''choc'', ''fruit'', and ''HG'' that turns true whenever the ice cream is one our friend will like would be this: | ||
Revision as of 09:43, 30 July 2014
--© D. Thiebaut 08:10, 30 January 2012 (EST)
Last revised --D. Thiebaut (talk) 08:05, 9 October 2013 (EDT)