forked from qiwsir/StarterLearningPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path20701.py
More file actions
30 lines (21 loc) · 531 Bytes
/
20701.py
File metadata and controls
30 lines (21 loc) · 531 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
29
30
#!/usr/bin/env python
# coding=utf-8
__metaclass__ = type
class Person:
def __init__(self, name):
self.name = name
def getName(self):
#return self.name
return girl.name
def breast(self, n):
self.breast = n
def color(self, color):
print "%s is %s" % (self.name, color)
def how(self):
print "%s breast is %s" % (self.name, self.breast)
girl = Person('canglaoshi')
name = girl.getName()
print name
girl.breast(90)
girl.color("white")
girl.how()