美文网首页从零开始学Python
P3:数值计算(python版

P3:数值计算(python版

作者: iLester | 来源:发表于2018-01-27 20:12 被阅读1次

说明:代码研习社20189春的活动示例代码,活动说明及其他成员递交的地址:http://yun.zjer.cn/index.php?r=studio/activies/activiesdetail&sid=531&aid=9241

# coding: utf-8

import math
print('100+135={}'.format(100+135))

temp = divmod(76,23)
print('76除以23,商为{},余数为{}。'.format(temp[0], temp[1]))

print('24的三次方为:{}'.format(pow(24,3)))

print('8的算术平方根为:{}'.format(math.sqrt(8)))

运行结果:


output

相关文章

网友评论

    本文标题:P3:数值计算(python版

    本文链接:https://www.haomeiwen.com/subject/xyloaxtx.html