Question: The following python code has a missing attribute. If we run this code as it is now, we will get an error message. Debug the

The following python code has a missing attribute. If we run this code as it is now, we will get an error message. Debug the code by adding the missing attribute and run the program and get the output.

#Encapsulaiton

class Employee:

def __init__(self):

self.__ssn = '307 878 876'

def pirntInfo(self):

print(self.__ssn)

employee1 = Employee()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!