Class .program not running

This is a sample O O P project.(NOT WORKING PROPERLY)

class Student:   #Common base class for all students.
    studentcount = 0    #class variable.

    def __init__(self, rollno, name, age):   #class constructor.
        self.rollno=rollno
        self.name=name
        self.age=age
        Student.studentcount = +1

    def displayCount(self):
         print("Total students:",Student.studentcount)

    def displayStudent(self):
        print("Rollno :", self.rollno)
        print("Name:", self.name)
        print("Age:", self.age)

    st1=Student(1001," Mahi", 24)
    st2=Student(1002,"Mohan", 25)
    st3=Student(1003,"Madan",22)

    st1.displayStudent( )
    st2.displauStudent()
    st3.displayStudent()
    print("Total number of students:", Student.studentcount )

can anyone point out the error.

What error are you seeing?

I can’t see any error. I think something wrong in class construction .
Following is the error message
“C:\Users\Administrator\PycharmProjects\O O P Class & Objects\venv\Scripts\python.exe” “C:/Users/Administrator/PycharmProjects/O O P Class & Objects/main.py”
Traceback (most recent call last):
File “C:/Users/Administrator/PycharmProjects/O O P Class & Objects/main.py”, line 3, in
class Student:
File “C:/Users/Administrator/PycharmProjects/O O P Class & Objects/main.py”, line 20, in Student
st1=Student(1001," Mahi", 24)
NameError: name ‘Student’ is not defined

Process finished with exit code 1

Then how do you know there is an error?

So when you run this code, you do not see an error message displayed in the terminal?

Oh, so you do see an error message (the one you posted just now).

It looks to me like you have indented certain lines of code that should not be indented. You also have a typo in one of the lines, but you will not see an error about that until you fix your indentation issues.

The lines that should not be indented are not part of the class definition but because you indented them, it is as if they are in the class, thus causing an error. Lastly, you have one small logic error because you have not written the correct syntax related to updating the studentcount class variable.

Thank you. Followed your hints. Now it is working properly. Thank you once again