Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 hidden or 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 hidden or 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 = "[email protected]" |
This file contains hidden or 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", "[email protected]") | |
student_2 = Student("Phillip", "Halpert", "2012", "[email protected]") |
This file contains hidden or 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 |