Sep-26-2018, 06:02 PM
(This post was last modified: Sep-26-2018, 06:02 PM by ThiefOfTime.)
Well, you created an object, if you try to print it this kind of output will occure.
if you want a neatly looking output when you convert it to string (or when you want to print it), you need to change the Students.py to this:
if you want a neatly looking output when you convert it to string (or when you want to print it), you need to change the Students.py to this:
class student: #this is the class name that we have to use to import it into a different file 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 def __repr__(self): return "{} {} {} {}".format(self.name, self.major, self.GPA, self.is_on_probation)This will let you have an defined output, when you try to print it :)