hey @ajaysiddartha .
there are some mistakes that you have made while implemeting it.
- every function inside a class needs to have a parameter
self as the first parameter , so that it can get reference of the particular while being called by the object of that class.
- You can’t use like int the you have used in function parameter.
if still you want you can do it like , def hi(regd : int) , this confirms that the parameter will be a integer value.
It works becuase , there are multiple way to initialize the variables in python.
You could have also declared these variable before __init__ , but it means the same and hence it works and doesn’t give any error.
i hope you understand this.
Thank You
.