this data is stored in instance attributes and can be manipulated from anywhere outside the class to secure itthat data should only be accessed using instance methods direct access should not be permitted class myclass(object)def setage(selfnum)self age num def getage(self)return self age zack myclass(zack setage( print(zack getage()zack setage("fourty five"print(zack getage()output you can observe the following output when you execute the code given above fourty five the data should be stored only if it is correct and validusing exception handling constructs as we can see abovethere is no restriction on the user input to setage(method it could be stringa numberor list so we need to check onto above code to ensure correctness of being stored class myclass(object)def setage(selfnum)self age num def getage(self)return self age zack myclass(zack setage(