Day 9: ------- Set Questions(Theory ): ----------------------- 1.What is Set? 2.What is the differece between list and set? 3.What are the methods present in set? 4.What are Advantages of Set? 5.How to remove the values present in set? 6.Is it possible to take particular value from set? 7.What is method used for sort value in set? 8.What is difference between remove() and discard()? 9.What is purpose of union ,intersection,difference,symmetric_difference? 10.Is it possible to convert set in to tuple? 11.Is reversing possible in set? QUESTION 1: ------------------ QUESTION 1.1: -------------------- Description : Create a new set with values and find the length of it Input : set = {10,20,30,90,10,10,40,50} QUESTION 1.2: -------------------- Description : Create a new set with values and find the length of it Input : set = {100,200,300,400,500,600,700} QUESTION 1.3: -------------------- Description : Create a new set with values and find the length of it Input : set = {python,selenium,sql,java} QUESTION 1.4: -------------------- Description : Create a new set with values and find the length of it Input : set ={10,20,30,90,10,10,40,50,python,java,22.4,True} QUESTION 2: ------------------ QUESTION 2.1: -------------------- Description : Add a value 100 at the last position of tuple Input: set ={ 10,20,30,90,10,10,40,50 } QUESTION 2.2: -------------------- Description : Add a value 'python' at the last position of tuple Input: set = {10,20,30,90,10,10,40,50} QUESTION 2.3: -------------------- Description : Add a values (100,200,300) at the last position of tuple Input: set = {10,20,30,90,10,10,40,50} QUESTION 2.4: -------------------- Description : Add a values ('java','python') at the last position of tuple Input: set= {10,20,30,90,10,10,40,50} QUESTION 3: ------------------ QUESTION 3.1: -------------------- Description : Find the maximum value in set Input: set ={ 10,20,30,90,10,10,40,50,10 } QUESTION 3.2: -------------------- Description :Find the maximum value in tuple Input: set = {10,20,30,90,10,10,40,50,10 } QUESTION 3.3: -------------------- Description :Find the maximum value in tuple Input: set = {python,selenium,sql,java} QUESTION 3.4: -------------------- Description :Find the minimum value in tuple Input: set = {100,200,300,900,400,500,1000} QUESTION 3.5: -------------------- Description :Find the minimum value in tuple Input: set{= python,selenium,sql,java} QUESTION 4: ------------------ QUESTION 4.1: -------------------- Description : Update set by following data {100,200,500} Input: set = {10,20,30,40,50,60} QUESTION 4.2: -------------------- Description : Update set by following data ['java','sql'] Input: set = {100,200,300,400,500,600,700} QUESTION 4.3: -------------------- Description : Update set by following data ['greens'] Input: set = {105,205,305,405,505,605,705,805} QUESTION 4.4: -------------------- Description : Update set by following data (100,200,500) Input: set = {105,205,305,405,505,605,705,805} QUESTION 4.5: -------------------- Description : Update set by following data ('j'+'greens') Input: set = {105,205,305,405,505,605,705,805} QUESTION 5: -------------------- QUESTION 5.1: -------------------- Description :Convert string into set Input:python QUESTION 5.2: -------------------- Description :Convert list into set Input:List = ['java','python',20,10,60] QUESTION 5.2: -------------------- Description :Convert tuple into set Input:tuple = (105,205,305,405,505,605,705,805,'java','python',20,10,60) QUESTION 6: -------------------- QUESTION 6.1: -------------------- Description : To check weather value 200 is present or not in set Input: set ={ 105,205,305,405,505,605,705,805} QUESTION 6.2: -------------------- Description : To check weather value 505 is present or not in set Input: set={ 105,205,305,405,505,605,705,805} QUESTION 6.3: -------------------- Description : Create a set with values and compare the another set Input: set= {10,20,30,40,50,60} Input: set1 = {10,20,30,40,50,60} QUESTION 7.4: -------------------- Description :Create a set with values and compare the another set Input: set= {10,20,30,40,50,60} Input: set1 ={ 60,20,30,40,50,10} QUESTION 8: -------------------- QUESTION 8.1: -------------------- Description : Get the each value of set by using for loop Input: set={ 105,205,305,405,505,605,705,805} QUESTION 8.2: -------------------- Description : Get the each value of tuple by using Enumarate for loop Input: set={ 105,205,305,405,505,605,705,805} QUESTION 8.3: --------------------- Description : Get the each value of setby using Enumarate for loop and print only odd index value Input: set={ 105,205,305,405,505,605,705,805} QUESTION 9: ------------------------ QUESTION 9.1: -------------------- Description :Create a set with values and perform union between two set Input: set= {10,20,30,40,50,60} Input: set1 ={ 60,80,90,40,50,10} QUESTION 9.2: -------------------- Description :Create a set with values and perform intersection between two Set Input: set= {10,20,30,40,50,60} Input: set1 ={ 60,80,90,40,50,10} QUESTION 9.3: -------------------- Description :Create a set with values and perform difference between two list Input: set= {10,20,30,40,50,60} Input: set1 ={ 60,80,90,40,50,10} QUESTION 9.4: -------------------- Description :Create a set with values and perform symmetric_difference between two Set Input: set= {10,20,30,40,50,60} Input: set1 ={ 60,80,90,40,50,10}