正在加载图片...
上游充通大 ParisTech SHANGHAI JIAO TONG UNIVERSITY INSTITUT DES SCIENCES ET TECHNOLOGIES PARIS INSTITUTE OF TECHNOLOGY Operation Basic operation on different type objects ·Type of the results: -bool->Int->double->float.... -20/7&20.0/7 Never trust =with float Application on mutable and immutable object: -a=(1,2) a=[1,2] -b=(3,4) b=[3,4] a+=b,a=a+b a+=b,a=a+bOperation • Basic operation on different type objects • Type of the results: – bool->Int->double->float…. – 20/7 & 20.0/7 • Never trust == with float • Application on mutable and immutable object: – a=(1,2) – b=(3,4) – a+=b, a=a+b a=[1,2] b=[3,4] a+=b, a=a+b
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有