赞
踩
**T
****F
****F
****T
****F
**D
)。A.1 B.3 C. 5 D.7
B
)打印出smith\exam1\test.txt 。A.print("smith\exam1\test.txt")
B.print("smith\\exam1\\test.txt")
C.print("smith\"exam1\"test.txt")
D.print("smith"\exam1"\test.txt")
A
)。A.[‘a’,‘b’,‘c’,‘d’] B.[‘ab’]
C.[‘cd’] D.[‘abcd’]
C
)是list1[:-1]A.0 B.[1,2,3,4,5,4,3,2,1]
C.[1,2,3,4,5,4,3,2] D.[0,1,2,3,4,3,2,1,0]
B
)A.lst.add(5) B.lst.append(5)
C.lst.addLast(5) D.lst.addEnd(5)
1.‘23’*3的结果是( )。
‘232323’
2.‘3//11//2018’.split(’/’)的结果是( )。
[‘3’,’’,‘11’,’’,‘2018’]
3.假设存在一个列表a=[3,4,5,6,5,4,3],则执行a.remove(3 )后,a的结果是( )。
[4,5,6,5,4,3]
4.list**(range**(2,12,2))[:-2].pop()的结果是( )。
6
5.要想得到[0,100]范围内的随机数,random.randint(0,n)里的n应该是
100
以上就是python程序设计的第一章习题答案
如有错误,欢迎指正!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。