Created
December 15, 2018 18:48
-
-
Save RyanCCollins/b4b9387040ffcf4abaa72d3d2fa14c57 to your computer and use it in GitHub Desktop.
Just a code example
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, name, student_id=332): | |
self.name = name | |
self.student_id = student_id | |
def __str__(self): | |
return "Student: " + self.name | |
def get_name_capitalized(self): | |
return self.name.capitalize() | |
students = [] | |
student = Student("Ryan Collins", 777) | |
students.append(student) | |
print(students[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment