def __init__(self, name, addr, dob, course, division): Person.__init__(self, name, addr, dob) self.__course = course self.__div = division self.__marks = dict() self.__rollNo = Student.autoRollNo Student.autoRollNo += 1
def __init__(self): ''' init fx ''' Person.__init__(self) self.position = [7, 2] self.motion = random.randint(0, 3) self.lives = 1 self.shape = [['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E']]
def __init__(self, name: str, age: int, wealth: int = 1, spear_lvl: int = 0, combat_lvl: int = 0, mace_lvl: int = 0, broadsword_lvl: int = 0) -> None: """ Constructor for Fighter class. Creates Fighter with given parameters ONLY if person is adult, else an error is printed. Default creation is name, 1 wealth, and 0 for each skill level. :param name: The Fighter's name :param age: The Fighter's age :param wealth: The Fighter's (initial) wealth (default value is 1) :param spear_lvl: The Fighter's spear (initial) skill level :param combat_lvl: The Fighter's unarmed combat (initial) skill level :param mace_lvl: The Fighter's mace (initial) skill level :param broadsword_lvl: The Fighter's broadsword (initial) skill level :return: None """ try: self.age = age if self.is_adult(): Person.__init__(self, name, age, wealth) self.__set_skills(spear_lvl, combat_lvl, mace_lvl, broadsword_lvl) self.__has_fought = False # var to check if fighter has fought else: raise ValueError("Invalid age.") except ValueError as e: print(str(e) + " You must be an adult to be a fighter!")
def __init__(self, arg_firstName, arg_lastName, arg_age): logging('CRE', 'Создан объект класса Librarian') self.post = None self.idNumber = Librarian.iteratorOfLibrarian Librarian.iteratorOfLibrarian += 1 self.workSchedule = {} Person.__init__(self, arg_firstName, arg_lastName, arg_age)
def __init__(self, name, id, age, average, institute): Person.__init__(self, name, id, age) self.average = float(average) self.institute = institute while (len(self.institute) > 10): self.institute = input("Enter shorter instiute's name:") self.institute = self.institute.title()
def __init__(self, beautician_id, fname, lname, date_joined, specialization, contact_number, street, zip, city, state): Person.__init__(self, fname, lname, street, zip, city, state, contact_number) self.__beautician_id = beautician_id self.__date_joined = date_joined self.__specialization = specialization
def __init__(self, name): # initialize Person attributes Person.__init__(self, name) # new BabsonPerson attribute: a unique ID number #copy from person self.idNum = BabsonPerson.nextIdNum #注意! BabsonPerson.nextIdNum += 1 #increment by 1
def __init__(self, title, wallet, hand): Person.__init__(self, title, wallet, hand) self.hasWon = False self.splitWon = False self.bet = 0 self.is_splitting = False self.is_surrendering = False
def __init__(self, simulation, conceive, miscarry, ivf, seed, mom=None, dad=None): Person.__init__(self, simulation=simulation, seed=seed, mom=mom, dad=dad) if mom is None: self.height = self.random_obj.random() * 13.0 + 57 self.weight_natural = self.random_obj.random() + 200 + 90 else: self.attractive = (dad.attractive + mom.attractive) / 2 + self.random_obj.random() - 0.5 if mom.spouse is not None: self.affluence = (mom.spouse.affluence + mom.affluence) / 2 + self.random_obj.random() - 0.5 self.social = (mom.spouse.social + mom.social) / 2 + self.random_obj.random() - 0.5 else: self.affluence = mom.affluence + self.random_obj.random() - 0.5 self.social = mom.social + self.random_obj.random() - 0.5 self.height = (mom.height + (dad.height * 57 / 60)) / 2 + (self.random_obj.random() * 5 - 5) self.weight_natural = (mom.weight_natural + (dad.weight_natural * 170 / 198)) / 2 + (self.random_obj.random() * 5 - 5) self.father_of_pregnancy = None self.weight_current = 90 self.weight_natural_mod = self.weight_natural self.months_trying = 0 self.chance_to_conceive = conceive self.chance_to_miscarry_early = miscarry self.chance_on_ivf = ivf self.chance_to_miscarry_late = 0.015 self.has_had_still_birth = False self.on_ivf = False self.miscarriage_risk = 0.0 self.is_pregnant = False self.preg_month = 0
def __init__(self, n=None, a=None, ID=0, add='unknown'): #contructor method Person.__init__(self, n, a) #intializing objects self.identity_number = ID self.employee_address = add
def __init__(self, studentID, name = "Student X", gender = "m", leavingCertificate = 700): self.studentID = studentID Person.__init__(self, name, gender) self.modules = [] self.moduleEnrollments = {} self.semester = 1 self.leavingCertificate = leavingCertificate #TODO: check Irish system self.faculty = ""
def __init__(self): Person.__init__(self) self.countryWhereGoing = "default_country" self.daysOfTravel = 14 self.price = 700 self.countOfThings = 0 self.weightOfLuggage = 21 Tourist.allTouristsCounter += 1
def __init__(self, name, surname, father_name, birth_date, comp, spec, pos, sal, proj): self.company = comp self.spec = spec self.position = pos self.salary = int(sal) self.project = proj Person.__init__(self, name, surname, father_name, birth_date)
def __init__(self,name,dni,age,discapacity,r_type,room_id,payment,tour,restaurant): Person.__init__(self,name,dni,age,discapacity) self.r_type = r_type self.room_id = room_id self.payment = payment self.tour = tour self.restaurant = restaurant
def __init__(self, arg_firstName, arg_lastName, arg_age): logging('CRE', 'Создан объект класса Reader') Person.__init__(self, arg_firstName, arg_lastName, arg_age) self.readerListNumber = Reader.readerListIncrement Reader.readerListIncrement += 1 self.readerList = {} s = "{} {}, возраст: {}, номер читательского билета: {}".format( self.firstName, self.lastName, self.age, self.readerListNumber) Library.listOfReader.append(s)
def __init__(self, names, surname, birthday, grades=[]): Person.__init__(self, names, surname, birthday) # Example # [("WF", 4)] self.__grades = grades # Instance of Subjects self.__subjects = None
def __init__(self, name, address, dob, course, division): Person.__init__(self,name, address, dob) self.__roll_no = Student.auto_roll_no Student.auto_roll_no += 1 self.__name = name self.__address = address self.__dob = dob self.__course = course self.__division = division self.__marks = dict()
def __init__(self, name): # initialize Person attributes Person.__init__(self, name) # new BabsonPerson attribute: a unique ID number self.idNum = BabsonPerson.nextIdNum BabsonPerson.nextIdNum += 1
def __init__(self): Person.__init__(self, '', '', '') BaseWidget.__init__(self,'Person window') self.parent = None #Definition of the forms fields self._firstnameField = ControlText('First name') self._middlenameField = ControlText('Middle name') self._lastnameField = ControlText('Lastname name') self._fullnameField = ControlText('Full name') self._buttonField = ControlButton('Press this button') #Define the button action self._buttonField.value = self.buttonAction self._formset = ['_firstnameField', '_middlenameField', '_lastnameField', '_fullnameField', (' ','_buttonField', ' '), ' ']
def __init__(self): Person.__init__(self, '', '', '') BaseWidget.__init__(self, 'Person window') self.parent = None #Definition of the forms fields self._firstnameField = ControlText('First name') self._middlenameField = ControlText('Middle name') self._lastnameField = ControlText('Lastname name') self._fullnameField = ControlText('Full name') self._buttonField = ControlButton('Press this button') #Define the button action self._buttonField.value = self.buttonAction self.formset = [ '_firstnameField', '_middlenameField', '_lastnameField', '_fullnameField', (' ', '_buttonField', ' '), ' ' ]
def __init__(self, person_id, prefix, first_name, last_name, nick_name, thai_first_name, thai_last_name, birth_date, nationality, shirt_size, photo_path, email, kmitl_id, academic_year, department, faculty, password): Person.__init__(self, person_id, prefix, first_name, last_name, nick_name, thai_first_name, thai_last_name, birth_date, nationality, shirt_size, photo_path, email) self.kmitl_id = kmitl_id self.person_id = person_id self.academic_year = academic_year self.department = department self.faculty = faculty self.password = password # class Student(Person): # def __init__(self, stu_id=123, firstName = None, lastName = None, nickName = None, prefix = None, # gender = None, thaiFirst = None, thaiLast = None, photo = None, role = None, shirtSize = None , birth_d = None): # # Person.__init__(self, firstName, lastName, nickName, prefix, gender, thaiFirst, thaiLast, photo, role, shirtSize, birth_d) # # self.studentID = stu_id # # def printInfo(self): # return "In student:", self.studentID , Person.printInfo(self) # # # print(Student("560900xx", "Thitiwat", "Wata").printInfo())
def __init__(self, simulation, seed, mom=None, dad=None): Person.__init__(self, simulation, seed, mom, dad) self.random_obj = Random() self.random_obj.seed(seed) self.sim = simulation if mom is None: self.height = self.random_obj.random() * 14.5 + 60 self.weight_natural = self.random_obj.random() + 200 + 90 else: if mom.spouse is not None: self.affluence = (mom.spouse.affluence + mom.affluence) / 2 + self.random_obj.random() - 0.5 self.social = (mom.spouse.social + mom.social) / 2 + self.random_obj.random() - 0.5 else: self.affluence = mom.affluence + self.random_obj.random() - 0.5 self.social = mom.social + self.random_obj.random() - 0.5 self.height = (dad.height + (mom.height * 60 / 57)) / 2 + (self.random_obj.random() * 5 - 5) self.weight_natural = (dad.weight_natural + (mom.weight_natural * 198 / 170)) / 2 + (self.random_obj.random() * 5 - 5) self.weight_current = 90 self.weight_natural_mod = self.weight_natural
def __init__(self, n=None, a=None, did=None, dad=None): Person.__init__(self, n, a) self.doctor_id = did self.doctor_address = dad
def __init__(self, name): # initialize Person attributes Person.__init__(self, name) # new BabsonPerson attribute: a unique ID number - INCREMENT BY 1 for ID number of each new person self.idNum = BabsonPerson.nextIdNum BabsonPerson.nextIdNum += 1
def __init__(self, name="", age=21, major="undeclared", gpa=0.0): Person.__init__(self, name, age) # call super constr self.setMajor(major) self.setGPA(gpa)
def __init__(self, age, name, tricks, language, material): Person.__init__(self, age, name, tricks, language) Machine.__init__(self, material)
def __init__(self): Person.__init__(self)
def __init__(self,n='Unknown',a=0,ID='Uknown',PA='Uknown',NV=0): Person.__init__(self,n,a) #calling the variable from the super class self.ID_number=ID self.patient_adress=PA #making a constructor self.number_of_visits=NV
def __init__(self, n = None, a = 0, DID = None, dadd = None): Person.__init__(self, n, a) self.doctor_number = DID self.doctor_address = dadd
def __init__(self, name): Person.__init__(self, name) self.clocked_in = False
def __init__(self,n=None,a=None,doc_i=0,doc_a="unknown"): # constructor to initialise variables Person.__init__(self,n,a) # calling Person constructor self.ID_num = doc_i # variable to store doctor's ID number self.address = doc_a # variable to store doctor's address
def __init__(self, classSchedule=None, **kwargs): Person.__init__(self, **kwargs) if classSchedule is None: self.classSchedule = Schedule() else: self.classSchedule = classSchedule
def __init__(self, n="unknown", a=0, id_number=0, address="unknown", num_of_visits=0): Person.__init__(self, n, a) self.id_number = id_number self.address = address self.num_of_visits = num_of_visits
def __init__ (self,name='uknown',age=0,ID=None,a=None,v=None,): self.patient_ID = ID self.patient_address = a self.visits = v Person.__init__(self,name,age)
def __init__(self, member_id, fname, lname, date_member_since, contact_number, street, zip, city, state): Person.__init__(self, fname, lname, street, zip, city, state, contact_number) self.member_id = member_id self.date_member_since = date_member_since
def __init__(self, firstname, lastname, age, student_num, gpa): '''(Student, str, str, int, age, str, float) -> NoneType ''' Person.__init__(self, firstname, lastname, age) self._student_num = student_num self._gpa = gpa
def __init__(self,n='None',a=0,id_n='unkwown',add='unkwown'): Person.__init__(self,n,a) # constructor method from parent class self.doc_id_number=id_n # variable to store doctor's id number self.doc_address=add # variable to store doctor's address
def __init__(self,name): Person.__init__(self,name) self.IdNum = MITPerson.nextIdNum MITPerson.nextIdNum +=1
def __init__(self,n=None,a=None,drID=None,da=None): Person.__init__(self,n,a) self.doctor_identity_no = drID self.doctor_address = da
def __init__(self,n=None,a=None,pID=None,pd=None,nv=None): Person.__init__(self,n,a) self.patient_identity_no = pID self.patient_address = pd self.no_of_visits = nv
def __init__(self, n=None, a=0, PID=None, padd=None, nv=0): Person.__init__(self, n, a) self.patient_number = PID self.patient_address = padd self.number_visits = nv
def __init__(self,name,age): Person.__init__(self,name) self.age=age
def __init__(self, work_id, name, age): Person.__init__(self, name, age) self.work_id = work_id Employee.__counter += 1
def __init__(self, teachingSchedule=None, **kwargs): Person.__init__(self, **kwargs) if teachingSchedule is None: self.teachingSchedule = Schedule() else: self.teachingSchedule = teachingSchedule
def __init__(self,n="Unknown",a=0,Id=0,ad="Unknown"): Person.__init__(self,n,a) self.id_number=Id self.address=ad Patient.visits+=1
def __init__(self,ide=0,adr=None,vst=0,n=None,a=0): # constructor which initialises parameters to be accessed throughout the programme Person.__init__(self,n,a) self.identitynumber= ide self.address=adr self.visits=vst
def __init__(self, name_: str, lastName_: str, cargo_: str, fechaNac: datetime): Person.__init__(self, name_, lastName_, fechaNac) self.__cargo = cargo_
def __init__ (self,name='uknown',age=0,ID=None,a=None): self.doctor_ID = ID self.doctor_address = a Person.__init__(self,name,age)
def __init__(self,n='unknown',a=0,doc_ID=0,doc_addr="unknown"): # constructor object method for Doctor class Person.__init__(self,n,a) # calling Person constructor self.ID_number = doc_ID # initialising object variable self.doctors_address = doc_addr # initialising object variable
def __init__(self,id_nmbr,addrs,n=None,a=None): # Initializing object variables Person.__init__(self,n,a) self.id_number=id_nmbr self.address=addrs
def __init__(self, pidn = 'unknown', paddr = 'unknown', v = 0, n = 'unknown', a = 0): Person.__init__(self, n, a) self.patient_id = pidn self.patient_address = paddr self.visits = v
def __init__(self, name, cash=3000): Person.__init__(self) self.name = name self.cash = cash self.bet = 0 self.doubled_down = False
def __init__(self, firstName, lastName, telephone, dateOfBirth, countryOfOrigin): Person.__init__(self, firstName, lastName, telephone, dateOfBirth, countryOfOrigin)
def __init__(self, didn = 'unknown', daddr = 'unknown', v = 0, n = 'unknown', a = 0): Person.__init__(self, n, a) self.doctor_id = didn self.doctor_address = daddr
def __init__(self,i="Unknown",ad="Unknown",nu=0,n=None,a=None): Person.__init__(self,n,a) # calling Person's constructor self.idnumber=i self.adress=ad self.visit=nu
def __init__(self, name, age, gender, email, cnic, country, city, address, status, fee, student_class): Person.__init__(self, name, age, gender, email, cnic, country, city, address, status) self.fee = fee self.student_class = student_class
def __init__(self, n = None, a = 0, id = None, add = None, v = 0): Person.__init__(self, n, a) #calling Person class self.ID_number = id self.address = add self.VisitNum = v
def __init__(self,nn,vn,mn): Person.__init__(self,nn,vn) self.setMatrikelnummer(mn)
def __init__(self, stu_id=123, firstName = None, lastName = None, nickName = None, prefix = None, gender = None, thaiFirst = None, thaiLast = None, photo = None, role = None, shirtSize = None , birth_d = None): Person.__init__(self, firstName, lastName, nickName, prefix, gender, thaiFirst, thaiLast, photo, role, shirtSize, birth_d) self.studentID = stu_id