Create a class called Person with the attributes name (text), age (integer) and address (text).
Instructions
- Add a constructor to initialize the attributes.
- Implement the method
display_information(), which displays the name, age and address of the person. - Implement the method
modify_address(), which changes the address of the person and displays a message confirming the change. - Create at least two objects of the
Person class with different data. - Use
display_information() and modify_address() to show the information of the people and to change the address of one of them.
Input and output format. Read, one per line and with no prompts, the name, age and address of the first person, the name, age and address of the second person, and the new address of the first one. Print Information of Person 1: and its data (Name: …, Age: …, Address: …), an empty line, Information of Person 2: and its data, an empty line, then change the address of the first person (printing The address has been modified to: …) and display its information again.