python_coursera_RICE 第一周

IDE 

codeskulptor3(python3)/codeskulptor(python2)

Atom

print:

python3 => print("balabala")

python2 => print "balabala"

幂运算 

a**b

平方根 => number**0.5

类型转换

int(3.7) => 3    int(-3.7) => -3

print(3+6.7)

3 =>3.0 =>3.0+6.7 =>9.7 乘法相同

除法

division always gives me back a floating point number

print(8/2) => 4.0

print(8//2) => 4

float//float => float

Error

变量未定义(SPELL错误)、符号的匹配问题、类型错误

错误的列表:点击打开链接

函数

函数调用的6个过程:

1. create a new frame for the function call

2. compute values of arguements to function call

3. assign values to paraments of the function

4. execute the body of the function

5. return a value from the function to global frame

6. resume execution of global frame

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值