Skip to content

Instantly share code, notes, and snippets.

@jordanhudgens
Created March 15, 2018 01:11
Show Gist options
  • Save jordanhudgens/2f856be7c1cf83775b2f2b2c899c1293 to your computer and use it in GitHub Desktop.
Save jordanhudgens/2f856be7c1cf83775b2f2b2c899c1293 to your computer and use it in GitHub Desktop.
class User:
def __init__(self, email, first_name, last_name):
self.email = email
self.first_name = first_name
self.last_name = last_name
def greeting(self):
return f'Hi {self.first_name} {self.last_name}'
class AdminUser(User):
def active_users(self):
return '500'
tiffany = AdminUser('[email protected]', 'Tiffany', 'Hudgens')
kristine = User('[email protected]', 'Kristine', 'Hudgens')
print(tiffany.active_users())
print(tiffany.greeting())
print(kristine.active_users())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment