Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
student_3 = Student.from_string(student_3_string) |
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 Student(): | |
def __init__(self, first_name, last_name, birth_year, emergency_contact): | |
self.first_name = first_name | |
self.last_name = last_name | |
self.birth_year = birth_year | |
self.emergency_contact = emergency_contact | |
@classmethod | |
def from_string(cls, student_string): |
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
student_3_string = "Dwight-Schrute-1970-angela_martin@office.com" |
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
student_1 = Student("Cecelia", "Halpert", "2010", "jim_halpert@office.com") | |
student_2 = Student("Phillip", "Halpert", "2012", "pam_halpert@office.com") |
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 Student(): | |
def __init__(self, first_name, last_name, birth_year, emergency_contact): | |
self.first_name = first_name | |
self.last_name = last_name | |
self.birth_year = birth_year | |
self.emergency_contact = emergency_contact |