Skip to content

Instantly share code, notes, and snippets.

@abadger
Last active November 8, 2022 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abadger/b590e8a9ed5900a93d8e5c0bab0de22c to your computer and use it in GitHub Desktop.
Save abadger/b590e8a9ed5900a93d8e5c0bab0de22c to your computer and use it in GitHub Desktop.
Set exercises
In your classroom, you have ten students that are born in a variety of months.
(1) Use sets or frozensets to tell if anyone was born in the summer.
(2) Use sets or frozensets to tell who was born when the school year is not in session.
The summer months are June, July, and August.
The ten students and their birthdays are:
Allen January
Peggy February
James March
Alfred April
Cain February
Fitz July
Janet July
Ryan June
Bryan April
Filippe October
The data will come to you as a nested list (also known as a list of lists or a multidimensional list).
for instance, here's the first three students:
```
[
["Allen", "January"],
["Peggy", "February"],
["James", "March"]
]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment