因为有基础,我直接简单写了##定义类,创建对象,调用对象方法,返回值 class person: def speak(self,x): print('love',x) return x + '*********' xia = person() s = xia.speak('theonewholoveme') print(s) ##添加属性,和Java有区别 class B: def func(self,x = '**'): print(self.name,x) z = B() z.name =…