forked from qiwsir/StarterLearningPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path20901.py
More file actions
24 lines (18 loc) · 423 Bytes
/
20901.py
File metadata and controls
24 lines (18 loc) · 423 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
#!/usr/bin/env python
# coding=utf-8
__metaclass__ = type
class Person:
def speak(self):
print "I love you."
def setHeight(self, n):
self.length = n
def breast(self, n):
print "My breast is: ",n
class Girl(Person):
def setHeight(self):
print "The height is:1.70m ."
if __name__ == "__main__":
cang = Girl()
cang.setHeight()
cang.speak()
cang.breast(90)