Address: WsCube Tech, Laxmi Tower, Bhaskar Circle, Jodhpur, Rajasthan, India
Contact Us at: +919269698122, +919024244886. Mail us at: info@[Link]
Set Tasksheet
Q.1 You have been given 2 sets named engineers, phd_holders.
engineers = {"Ram","Shyam", "Radha", "Mohan", "Geeta", "Sunita"}
phd_holders = {"Krishna", "Ram", "Rakesh", "Mohan", "Annirudh","Geeta"}
solve all below mentioned condition using set methods
i) Find out a set of those who are engineers but not phd_holders
ii) Find out a set of those who are phd_holders but not engineers
iii)Find out a set of those who either phd_holders or engineers
iv) Find out a set of those who are both phd_holders and engineers
v) Generate a new set in which every engineer and phd_holder is present only once.
Q. 2 Do the above question without using set methods.
Q. 3 What are properties of sets and how you can create an empty set.
Q.4 Write a program to find sum, average of all elements inside a set.
Q.5 What is frozen set, explain with an example.
Q.6 Differentiate among list, tuple, set and dictionary property wise.
Q.7 Can we make a nested set?
Q.8 What do you mean by sub set and super set. Is A sub set of B?
A ={ 1, 2, 3, 4, 5}
B = {2, 3}