Created
May 3, 2023 12:10
-
-
Save stephengruppetta/7dc93e83e60c904f079770ff19d098b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Wizard: | |
def __init__(self): | |
self.name = None | |
self.patronus = None | |
self.birth_year = None | |
self.house = None | |
self.wand = None | |
# Create two wizard instances | |
harry = Wizard() | |
hermione = Wizard() | |
# We'll do this for now, but we'll learn a better way later | |
harry.name = 'Harry Potter' | |
hermione.name = 'Hermione Granger' | |
print(harry.name) | |
# Harry Potter | |
print(hermione.name) | |
# Hermione Granger |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment