-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObjOps.py
More file actions
31 lines (24 loc) · 690 Bytes
/
ObjOps.py
File metadata and controls
31 lines (24 loc) · 690 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class Ipad:
size = 15
def __init__(self, width, height):
self.width = width
self.height = height
self.x = 0
self.y = 0
def getData(self):
print("Width:", self.width)
print("Height:", self.height)
print("X:", self.x)
print("Y:", self.y)
return (self.width, self.height)
def setData(self, width, height):
self.width = width
self.height = height
self.x = width
self.y = height
print("QA automating from my Ipad")
#creating object for the class
#synthax to create objects in python
obj = Ipad(10, 20) # pass required arguments
obj.getData()
print("Size:", obj.size)