python-035
来源:互联网 发布:阿里云销售工资 编辑:程序博客网 时间:2024/06/06 00:14
0. 变量和函数
1. emmmm,包含关系?
2. 机器猫?
3. 长宽
4. 具体?
5. 封装:看不到
继承:你有我也有
多态:多法多效
6. 现在还没发现
2.0
class Person:
name = '小甲鱼'
def name1(self):
print(self.name)
#-------矩形类实例对象-------#
class Rectangle:
length = 5.00
width = 4.00
def getRect(self):
print('这个矩形的长是:%.2f,宽是:%.2f'%(float(self.length), float(self.width)))
def setRect(self):
print('奇怪输入矩形的长和宽...')
self.length = input('长:')
self.width = input('宽:')
def getArea(self):
area = float(self.length) * float(self.width)
print(area)
阅读全文
0 0
- python-035
- Python
- Python
- Python
- python
- Python
- PYTHON
- Python
- Python
- Python
- Python
- Python
- Python
- Python
- Python
- Python
- Python
- python
- 自封装简单微信平台登录和获取用户信息
- python 模块和包
- hdu 5534 Partial Tree(dp+降唯)
- Mysql| where子句过滤数据(BETWEEN,IS NULL,=,!=,...)
- 贝叶斯(二)
- python-035
- 算法进阶3-2
- linux集群自动化免密部署服务
- spring cloud的网关服务Zuul
- 在此计算机中仅有部分visual studio2010产品已升级到SP1,只有全部升级,产品才能正常运行
- TP3.2加载外部PHPexcel类,实现导入和导出
- Numpy库学习—squeeze()函数
- 数据库验证:用户登录框,动态产生验证码
- 机器学习学习笔记2-有监督学习和无监督学习