Table of Contents

discrete Keyword 2

variables (environment/local)

Definition

A local variable is only known in the function that you created it in. It isn't known in any other functions and can't be used in any other function. Each time you use the function is starts at whatever value you assigned it to. Global variables are known and can be used by any function in the program. So if you make a variable outside of main() it is a global variable because it can be used in any function. If you make a variable inside main() it can only be used in main() so it is a local variable.

References

discrete Keyword 2 Phase 2

Intersection

Definition

Two sets A and B is the set that contains all elements of A that also belong to B (or equivalently, all elements of B that also belong to A), but no other elements.

Example:

  The intersection of the sets {1, 2, 3} and {2, 3, 4} is {2, 3}.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

Demonstration

Demonstration of the indicated keyword.

Example:

 The intersection of {1, 2, 5, 7} and {1, 5, 6, 7} is {1, 5}
 
 Intersection of {red, white, green, blue} and {green, yellow, blue, white} is {green, white, blue}
 
 Intersection of {1,5} and {1,5} is {1,5}