Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #التغليف لمستوي اعلا بواسطة القايمة list
- class beko:
- def __init__(self,**kk):
- self.bb=kk
- def set1(self,x):
- #هنا تم استخدام اندكس خاص بالمتغير لرفع الامن
- self.bb[0]=x
- def get1(self):
- return self.bb[0]
- def set2(self,y):
- #هنا تم استخدام اندكس خاص لرفع الامن
- self.bb[1]=y
- def get2(self):
- return self.bb[1]
- b=beko()
- b.set1(int(input("enter the numer1\n")))
- b.set2(int(input("enter the numer1\n")))
- print(b.get1()+b.get2())
Advertisement
Add Comment
Please, Sign In to add comment