How do I approach the following problem in python? [closed]

In my recent exams I had the following problem, and I didn’t even know where to start. Any help will be appriciated:

Let’s suppose that python does not have “set” and “dict” functions. Write a class named “IntSet” for sets with integrals as data and the right methods so that the program does the following:


I’m really sorry if I translated it wrong, English is not my native language. Thank you in advance for any help given.


This problem requires knowledge about Object oriented programming. You need to create a class named ‘IntSet’ which has methods ‘new_element’, ‘symmetric_difference’, ‘has_element’, ‘delete_element’ and ‘union’ with required functionalities. I recommended you follow some tutorials on python classes and objects.

Following links may be useful;

Python Object Oriented Programming

Python Classes and Objects