Facebook
From kush, 1 Year ago, written in Plain Text.
This paste is a reply to 5 from kush - view diff
Embed
Download Paste or View Raw
Hits: 177
  1. class Person:
  2.     domain_main=''
  3.     counter=0
  4.     def __init__(self,first_name,last_name,age):
  5.         self.__first_name=first_name
  6.         self.__last_name=last_name
  7.         self.__age=age
  8.         Person.counter+=1
  9.     def __str__(self):
  10.         return(self.__first_name+' '+self.__last_name+' is '+self.__age+' years old and her email id is '+self.__first_name+'.'+self.__last_name+"@"+self.domain_name)
  11.     def fullname(self):
  12.         return(self.__first_name+' '+self.__last_name)
  13.     @property
  14.     def age(self):
  15.         return(self.__age)
  16.        
  17.     @age.setter
  18.     def age(self,value):
  19.         self.__age=value
  20.  

Replies to Re: 6 rss

Title Name Language When
Re: 7 kush text 1 Year ago.