Facebook
From Beefy Pheasant, 5 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 45
  1. class Person:
  2.     def __init__(self,first_name,last_name,age):
  3.         self.__first_name = first_name
  4.         self.__last_name = last_name
  5.         self.__age = age
  6.         self.__gmail = first_name + "." +  last_name+"@"+self.domain_name
  7.     def __str__(self):
  8.         return(self.fullname() + " is " + self.__age + " years old and her email id is " + self.__gmail)
  9.     def fullname(self):
  10.         return(self.__first_name + " " + self.__last_name)