练习题
1.表达式’test.py’.endswith(’.py’)的值为__True__。
2.表达式 int(‘123’)的值为__123__。
3.表达式 ‘Beautifule is better than ugly.’.startswith(‘Be’,5)的值为__False__。
4.假设a,b=10,50,则条件表达式a>10 and b<100的值为__False_____。
5.python3.x语句 for i in range(3):print(i,end=’,’)的输出结果为__0,1,2,__。
6.程序的基本结构:顺序结构、选择结构和循环结构。
7.在python语言内置的random库中,哪个函数功能是从序列s中随即选择一个元素(A):A、choice(s),B、randint(m,n),C、shuffle(s),D、uniform(m,n)
8.以下程序的输出结果(3
5)
print(3,end="")
print()
print(5)
9.表达式int(False)的值为:0。