[主观题]假设已导入random标准库,那么表达式max([random.randint(1,10)foriinrange(10)])的值一定是10。此题为判断题(对,错)。
[主观题]假设已成功导入os和sys标准库,那么表达式os.path.dirname(sys.executable)的值为Python安装目录。此题为判断题(对,错)。
[主观题]假设random模块已导入,那么表达式random.sample(range(10),7)的作用是生成7个不重复的整数。此题为判断题(对,错)。
[主观题]假设random模块已导入,那么表达式random.sample(range(10),20)的作用是生成20个不重复的整数。此题为判断题(对,错)。
[主观题]已知函数定义deffunc(*p):returnsum(p),那么表达式func(1,2,3,4)的值为______。
[主观题]已知函数定义deffunc(*p):returnsum(p),那么表达式func(1,2,3)的值为______。
[单选题]数值函数Int(数值表达式)返回数值表达式值的 ______。A.绝对值B.符号值C.整数部分值D.小数部分值
[主观题]已知有函数定义defdemo(*p):returnsum(p),那么表达式demo(1,2,3)的值为______、表达式demo(1,2,3,4)的值为_________。
[主观题]在Python3.x中reduce()是内置函数。此题为判断题(对,错)。
[单选题]To reduce the weight of the reciprocating parts, pistons of high-speed engines are made considerably shorterThis results in __________.A.less piston slap and quieter runningB.increased crankshaft bearing wearC.slightly greater piston wearD.decreased