In this program, we are implementing Properties. Python offers a better way to implement setters and getter with the help of properties by using attribute @property. By default properties are getters so we have to declare setter part explicitly.
Enter Employee Data:
Enter Id :101
Enter Name :Amit
Enter Gender:Male
Enter City :Gwalior
Enter Salary:35000
Displaying Employee Data:
Id : 101
Name : Amit
Gender : Male
City : Gwalior
Salary : 35000
Program:
Output
need an explanation for this answer? contact us directly to get an explanation for this answer