Answers to Class 8 Ungraded Quiz

- Can a value appear more than once in a set?
`no`

- What does it mean for a set B to be a subset of set A?
`all the values in B are contained in`

- What is the union of the sets A and B?
a new set consisting of all the elements in A and B- What is the intersection of the sets A and B?
a new set consisting of all the elements found in both A and B- What is the difference of the sets A and B?
a new set consisting of all the elements found in either A and B but not in both- Write the Python statement to create an empty set named s1.
`s1 = set()`

- Write a Python statement to create the set s2 containing the values 1, 2 and 3, using a set literal.
`s2 = {1, 2, 3}`

- If the variable s1 pointed to an empty set, what would you see if you printed this variable?
`set()`

- Name the two set methods that can be used to add elements to a set.
`add() and update()`

- Name the two set methods that can be used to remove an element from a set.
`discard() and remove()`