Discuss / Python / 作业

作业

Topic source

class Student(object):

    def __init__(self, name, gender):

        self.name = name

        self.__gender = gender

    def get_gender(self):

        return self.__gender

    def set_gender(self,gender):

        self.__gender = gender


  • 1

Reply