jcsz

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

2015-12-29 19:18  Miles.Yao  阅读(339)  评论(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中数据可以很大很大而不会超出范围,对大数的支持是比较好的。

分类:

技术点:

相关文章:

  • 2021-11-30
  • 2021-12-23
  • 2022-12-23
  • 2022-02-04
  • 2021-12-12
  • 2021-05-22
猜你喜欢
  • 2021-08-08
  • 2021-12-04
  • 2021-05-02
  • 2021-09-25
  • 2021-04-29
  • 2021-12-09
相关资源
相似解决方案