Advertisement
zixkhalid

Untitled

Jul 18th, 2015
594
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. n = int(input('your first number please :'))
  2. z = int(input('your scend number please :'))
  3. class Calc:
  4.     def numbres(self,x = n,y = z):
  5.         self.x = x
  6.         self.y  = y
  7.     def add(self):
  8.         return self.x + self.y
  9.     def sub(self):
  10.         return self.x - self.y
  11. a = Calc()
  12. if __name__ =='__main__':
  13.     a.numbres()
  14.     print(a.add())
  15.     print(a.sub())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement