0
What is my mistake?
class student: roll:" " gpa:" " def set_value(self,roll,gpa): self.roll=roll self.gpa=gpa def display(self): print(f"Roll:{self.roll},GPA:{self.gpa}") fahim=student() fahim.set_value(111,4.00) fahim.display()
1 Respuesta
+ 2
Just a matter of indentation, you used some spaces and some tabs and display() was not even indented (?) properly (you must be consistent while indenting with Python): https://code.sololearn.com/cb78oFR09NAE