why summ1 is not getting printed even it is defined in function?

后端 未结 0 836
轮回少年
轮回少年 2021-02-13 13:51
class Student:
    def __init__(self,m1,m2):
        self.m1=m1
        self.m2=m2

    def add(self,s1,s2):
        summ1 = self.m1 + self.m2
        summ2 = s1.m1 + s1         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题