IT 117: Intermediate Scripting
Class 08 Ungraded Quiz

  1. Can a value appear more than once in a set?


  2. What does it mean for a set B to be a subset of set A?


  3. What is the union of the sets A and B?


  4. What is the intersection of the sets A and B?


  5. What is the difference of the sets A and B?


  6. Write the Python statement to create an empty set named s1.


  7. Write a Python statement to create the set s2 containing the values 1, 2 and 3, using a set literal.


  8. If the variable s1 pointed to an empty set, what would you see if you printed this variable?


  9. Name the two set methods that can be used to add elements to a set.


  10. Name the two set methods that can be used to remove an element from a set.