2 Star 0 Fork 0

刘元涛 / hello_python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
math4test.py 631 Bytes
一键复制 编辑 原始数据 按行查看 历史
liuyuantao 提交于 2017-02-21 10:04 . 练习小项目初始化
#!/usr/bin/python
# -*- coding:utf-8 -*-
"""
abs(-5) # 取绝对值,也就是5
round(2.6) # 四舍五入取整,也就是3.0
pow(2, 3) # 相当于2**3,如果是pow(2, 3, 5),相当于2**3 % 5
cmp(2.3, 3.2) # 比较两个数的大小
divmod(9,2) # 返回除法结果和余数
max([1,5,2,9]) # 求最大值
min([9,2,-4,2]) # 求最小值
sum([2,-1,9,12]) # 求和
"""
float_number = input("请输入数字:")
mi = input("请输入幂:")
print(pow(float_number, mi))
Python
1
https://gitee.com/liuyuantao/hello_python.git
git@gitee.com:liuyuantao/hello_python.git
liuyuantao
hello_python
hello_python
master

搜索帮助