IT 117: Intermediate Scripting
Class 09 Ungraded Quiz

  1. Write a for loop that prints the elements in set s1.


  2. Write a Python expression to see if the set s1 contains 5.


  3. Write a Python expression to see if the set s1 DOES NOT contain 12.


  4. Write a Python expression that returns the union of the sets A and B.


  5. Write a Python expression that returns the intersection of the sets A and B.


  6. Write a Python expression that returns the difference between the sets A and B.


  7. Is the difference between the sets A and B the same as the difference between the sets B and A


  8. What does the clear method do?


  9. Write a Python expression that returns the largest element in the set A.


  10. Write a Python expression that returns the smallest element in the set A.