Skip to content

Instantly share code, notes, and snippets.

@stephengruppetta
Created August 20, 2023 18:49
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/549b42c79716d7b0cc69e311be833a57 to your computer and use it in GitHub Desktop.
Save stephengruppetta/549b42c79716d7b0cc69e311be833a57 to your computer and use it in GitHub Desktop.
# making_magic.py
from hogwarts_magic import Student, Wand
elder_wand = Wand("elder", "thestral tail hair", 15, power=1)
harry = Student("Harry Potter", "stag", 1980)
harry.assign_wand(
Wand("holly", "phoenix feather", 11)
)
print(elder_wand.convert_cm_to_inches(30))
print(harry.wand.convert_cm_to_inches(30))
print(Wand.convert_cm_to_inches(30))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment