Facebook
From hsanbdgvds d, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 125
  1. from Address import Address
  2. class Person:
  3.     def __init__(self,name, age, address):
  4.         self.__name = name
  5.         self.__age = age
  6.         self.__address = address
  7.     def __str__(self):
  8.         return(self.__name+" is a person who is "+str(self.__age)+" years old and lives in the following address : "+str(self.__address))
  9.  
  10.  
  11. class Address:
  12.     def __init__(self,street, city, state):
  13.         self.__street = street
  14.         self.__city = city
  15.         self.__state = state
  16.     def __str__(self):
  17.         return(self.__street+" , "+self.__city+" , "+self.__state)
  18.