Question: python only.2.0 and above Design a class named Information that holds the following personal data: name, age, address (this attribute has a default value of
python only.2.0 and above
Design a class named Information that holds the following personal data:
name, age, address (this attribute has a default value of unknown), and phone
number.
All the attributes are defined as private.
Write appropriate accessor and mutator methods.
Complete the definition of the __str__ method, such that it displays each
Information objects data in the following format:
name: khan age: 12 address: north america
Create two instances of the class.
Create a function named display_info that accepts an Information object as an
argument and display name, address, age, and phone number for the object
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
