You need a space between 'def' and '__init__'.
Then you must remove the import statement. The class
is already defined in your scope and there is no
module called 'Student'.
Tobiah
On 3/15/19 6:54 PM, Glenn Dickerson wrote:
class Student():
def__init__(self, name, major, gpa, is_on_probation):
self.name = name
self.major = major
self.gpa = gpa
self.is_on_probation = is_on_probation
import Student
student1 = Student('Jim', 'Business', 3.1, False)
student2 = Student('Pam', 'Art', 2.5, True)
print(student1.name)
print(student2.gpa)
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor