在线名词解释大全 - Python程序设计 - 详细

17Analyzethefollowingfragment:()sum=d=0whiled!=10.0:d+=0.1sum+=sum+d

A
The program does not run because sum and d are not initialized correctly.
B
The program never stops because d is always 0.1 inside the loop.
C
The program may not stop because of the phenomenon referred to as numerical inaccuracy for operating with floating-point numbers.
D
After the loop, sum is 0 + 0.1 + 0.2 + 0.3 + ... + 1.9
正确答案:
相关推荐
扫描二维码
关注公众平台