【无标题】

分类,回归
Integer (int): discrete and continuous

Floating point numbers are decimal values or fractional numbers like 133.5, 2897.11,
 | Decimals can suffer from their own precision issues, but generally, decimals are more precise than floats.

Booleans represent one of two values: True or False 

Type is also a data category
e.g. 
print (type (2,2))
---
<class: "float">

Built-in operators
@ 举证乘法;**次方 (3**2 = 9); %模运算,余数预算符 (5 % 2 = 1 #5/2的余数是1)
= 一个等于号是赋值( a = 1),== 是等于 (2 == 2)
! = : 不等于; // interger division (整除,计算结果是整数,舍弃小数位直接砍掉
/ 一个斜杠是浮点式除法,计算结果为float  ( 2 / 1 = 2.0)

+=:先计算再赋值 ( c += 2 # c= c+2)

取余:以除数为积,and 被除数为积
注意 % 与 math.fmod() 的区别,详见:Modulo operation

运算顺序
结合率 5-4-3 加减乘除是从左往右算
次方运算时从右往左算 :4**3**2 = 先算3的2次方,再算4的(3**2)次方

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值