Facebook
From Edgy Motmot, 5 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 58
  1. class Person:
  2.     counter=0
  3.     def __init__(self,first_name,last_name,age):
  4.         Person.counter+=1
  5.         self.first= first_name
  6.         self.last = last_name
  7.         self.age = age
  8.         self.email= first_name  + "."  + last_name +"@" +self.domain_name
  9.     def __str__(self):
  10.         return self.fullname() + " is " + str(self.age) + " years old and her email id is " + self.email
  11.     def fullname(self):
  12.         return self.first +" " +self.last