inclusion
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
inclusion [2024/03/15 23:31] – created ultracomfy | inclusion [2025/04/09 20:13] (current) – ultracomfy | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | <fs xx-large> | + | ~~Title: |
+ | <WRAP column right 18%> | ||
+ | {{page> | ||
+ | </ | ||
+ | |||
+ | <fs xx-large> | ||
====== Computer Science ====== | ====== Computer Science ====== | ||
Line 11: | Line 16: | ||
In logic, inclusivity describes whether an expression includes itself. Follow through //this// example: | In logic, inclusivity describes whether an expression includes itself. Follow through //this// example: | ||
- | [[logic operator# | + | [[logic operator# |
- | (Ball color = red) AND (Ball size = 12), ie. Is the ball red AND size 12?\\ | + | (Ice Cream) AND (Candy)\\ |
- | Returns true [[iff]] the ball meets both conditions at the same time. | + | It gets both. |
- | [[logic operator# | + | [[logic operator# |
- | (Ball color = red) OR (Ball size = 12), ie. is the ball red OR size 12?\\ | + | (Ice Cream) OR (Candy)\\ |
- | It's like asking | + | Imagine you are asked "does it hold candy or ice cream?", you look at the kid and find that it holds both, but you can only respond with "yes" or "no", |
[[logic operator# | [[logic operator# | ||
- | (Ball color = red) XOR (Ball size = 12), is the ball red OR size 12?\\ | + | (Ice Cream) XOR (Candy)\\ |
- | Is it red or size 12?, asked as if you want only one of these to apply. You can have one or the other, but not both. Think of a child - it can have ice cream XOR candy - ie. one or the other, but not both. | + | The child can have ice cream XOR candy - ie. one or the other, but not both.((It was really hard to find a real world example use case for XOR, I gave up, googled for it and went with [[https:// |
inclusion.1710541898.txt.gz · Last modified: 2024/03/15 23:31 by ultracomfy