1harshit234 / basic-program

0 stars 0 forks source link

issue in the position of static method #14

Open 1harshit234 opened 3 months ago

1harshit234 commented 3 months ago

class hm:

@staticmethod def fox(a, b): return a + b

def init(self, number): self.number = number

def addtonumber(self, n): self.number = self.number + n return self.number

a = hm(5) print(a.number) a.addtonumber(5) print(a.number)

print(hm.fox(5, 6))

there is some issue in this program

1harshit234 commented 3 months ago

baar baar hm.fox aur fox ko chnage karne se console meh output change ho ja raha hai