首页 > 其他 > 详细

Second: 基本类型-数值型(int, float)

时间:2015-12-29 21:07:00      阅读:163      评论:0      收藏:0      [点我收藏+]

基本类型中数值类型有 int, float, Decimal, Fraction

其中int 和 float 是比较常见的类型, 而Decimal 和 Fraction 不是那么常见, 所以暂时学习int 和 float.

Division (/) always returns a float

To do floor division and get an integer result (discarding any fractional result) you can use the // operator

To calculate the remainder you can use %

With Python, it is possible to use the ** operator to calculate powers

The equal sign (=) is used to assign a value to a variable.

 

运行一些基本的操作惊奇地发现,在python中数据可以很大很大而不会超出范围,对大数的支持是比较好的。

技术分享

Second: 基本类型-数值型(int, float)

原文:http://www.cnblogs.com/jcsz/p/5086785.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!