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()

31st Aug 2021, 11:53 AM
Avro
Avro - avatar
1 ответ
+ 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
31st Aug 2021, 12:08 PM
Maz
Maz - avatar