Reference no: EM132382342
Question
Using Python, determine the union, intersection and difference of the square and cube of integers ranging from 1 to 100. Sets are clearly the way to go here. You can use Math functions to generate the sets for the square and cube for the Integers.
The following functionality should be available for the user via a simple interface:
1. Display the Square and Cube for Integers ranging from 1 to100
2. Search the sets for a specific Integer and display the Square and Cube values
3. Display the Union of Square and Cube sets
4.Display the Intersection of Square and Cubesets
5. Display the Difference of Square and Cubesets
6.Exit the program
If an Integer is not found an appropriate message should be displayed
The program should continue to allow selections until the program is exited.
1.Use Sets and their associated union(), interaction() and difference() methods
2.Use functions as often as possible
3.Use comments to document your code