Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # الثوابت وتمرير القيم اثناء انشاء الكائن
- class bbb:
- def __init__(self,x,y):
- #__init__ هي دالة جاهزة لتمرير الثوابت
- self.x=x
- self.y=y
- def g(self):
- return self.x+self.y
- b=bbb( (int(input("enter the numer1 \n"))) , (int(input("enter the numer2\n"))) )
- #يتم تمرير الثوابت اثناء انشاء الكائن
- print(b.g())
Advertisement
Add Comment
Please, Sign In to add comment