Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input('your first number please :'))
- z = int(input('your scend number please :'))
- class Calc:
- def numbres(self,x = n,y = z):
- self.x = x
- self.y = y
- def add(self):
- return self.x + self.y
- def sub(self):
- return self.x - self.y
- a = Calc()
- if __name__ =='__main__':
- a.numbres()
- print(a.add())
- print(a.sub())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement