Skip to content

Instantly share code, notes, and snippets.

@stephengruppetta
Created July 27, 2023 19:31
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 stephengruppetta/6339510e78614d155c8a258979e65dc8 to your computer and use it in GitHub Desktop.
Save stephengruppetta/6339510e78614d155c8a258979e65dc8 to your computer and use it in GitHub Desktop.
# making_magic.py
from hogwarts_magic import Student, House
hermione = Student(
"Hermione Granger",
"otter",
1979,
1,
)
ron = Student(
"Ron Weasley",
"jack russell terrier",
1980,
1,
)
harry = Student(
"Harry Potter",
"stag",
1980,
1,
)
gryffindor = House(
"Gryffindor",
"Godric Gryffindor",
["scarlet", "gold"],
"lion",
)
hermione.assign_house(gryffindor)
ron.assign_house(gryffindor)
harry.assign_house(gryffindor)
for student in gryffindor:
print(student)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment