Back to Lesson

Set Relationship Hierarchy

Analyze containment relationships using logical booleans.

Instructions

  • Given
    req_perms = {"read"}
    ,
    user_perms = {"read", "write"}
    , and
    guest_perms = {"read", "execute"}
    .
  • Print whether
    req_perms
    is a subset of
    user_perms
    .
  • Print whether
    user_perms
    is a subset of
    guest_perms
    (reversed with "not").
  • Print whether
    user_perms
    is a superset of
    req_perms
    .
main.py
main.py