Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

object function in Python

class Student:
	def __init__(self, name, gpa, major):
    self.name = name
    self.gpa = gpa
    self.major = major
    
   	def is_good_student(self):
    	if self.gpa > 3.2:
        	return True
        else:
        	return False
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #object #function #Python
ADD COMMENT
Topic
Name
5+6 =