A program that performs various operations on mathematical sets. It allows the user to input elements into two sets and performs operations such as union, intersection, and difference. The sets are created based on user input and are converted from mutable to immutable. It also provides the ability to search for specific elements within the sets. The code includes a universe set, empty sets, and operations for set manipulation.
Files • Features • How To Use
- src: the file that implements de solution.
The main features of the application include:
- Set Creation: The code allows the user to input elements for two sets, which are stored in the variables set1 and set2. The size of each set is predefined.
- Set Operations: The code performs several set operations, such as union, intersection, and difference. These operations are carried out on the sets A and B created from the user-inputted elements.
- Complement Calculation: The code also calculates the complement of sets A and B with respect to the universe set U. Complements are stored in the variables differenceOperation and differenceOperation1.
- Element Search: The code provides the ability to search for a specific element within the sets. The user can choose to search in either the first set or the second set.
- User Interaction: The code utilizes user prompts and input to gather information, such as the elements of the sets and the choice to search for an element.
To clone and run this application, you'll need Git and Python installed on your computer. From your command line:
...
# Clone this repository
$ git clone https://github.com/bl33h/mathematicalSets
# Open the folder
$ cd src
# Run the app
$ python mathematicalSets.py