青少年软件编程(Python五级)等级考试试卷(2022年6月)
八进制:O
八进制:O14
八进制14O
八进制14
10
1,10
11
1,11
1,100,2
1,101,2
2,101,2
2,100,2
101,2,-2
100,1,-2
2,101,-2
2,100,-2
len(lst)-1, -1, -1
len(lst)-1, 0, -1
len(lst), -1, -1
len(lst)-1, -1
\\b
\\n
\\t
\\r
print("池塘里\"快乐的歌唱家")
print("池塘里\"快乐的歌唱家\")
print('池塘里'\"快乐的歌唱家\")
print('池塘里\"快乐的歌唱家\"')
print(S.find('e',1))
print(S.index('e'))
print(S.count('e'))
print(S.index('e',0,len(S)))
math.sin
math.sqrt
math.e
math.pow
print(time.ctime())
print(time.strptime())
print(time.nowtime())
print(time.local())
print(random.int(1,20))
print(random.randint(1,20))
print(random.sample(1,20))
print(random.shuffle(1,20))
width,height,background_color,max_words,mask
width,height,bold,memset,jieba,max_words
background_color,jieba,time,random,mask,max_words
max_words,mask,width,height,jieba,text_color
('小红', '小明', '李四', '张三')
['小红', '小明', '李四', '张三']
('小红')
运行出错
元组t不发生变化,仍为('x', 'y', ['X', 'Y'])。
结果为:('x', 'y', ['xx', 'yy'])
结果为:('x', 'y', 'xx', 'yy')
运行时错误
[1, 4, 9, 16, 25, 36, 49, 64, 81]
[9, 36, 81]
[3,6,9]
[4, 16, 36, 64]
输出结果为1到99(包括99)所有整数组成的列表。
输出结果为1到98(包括98)所有偶数数组成的列表。
输出结果为1到99(包括99)所有奇数组成的列表。
输出结果为1到97(包括97)所有质数(素数)组成的列表。
{['A', 'a'], ['B','b'],[ 'C', 'c']}
{ 'a', 'b', 'c'}
{'A': 'a', 'B': 'b', 'C': 'c'}
{'A', 'B', 'C'}
[1, 2, 3, 4]
['a', 'b', 'c', 'd']
['a', 1,'b',2, 'c', 3,'d',4]
['a':1,'b':2,'c':3,'d':4]
[3, 8, 2, 7, 6]
[5, 3, 8, 7, 6]
[3, 5, 8, 2, 6]
[5, 3, 8, 2, 6]
[0, 1, 2,3]
[1, 2, 3, 4]
[4, 3, 3, 5]
[4, 3, 3, 4]
{1, 2, 3}
{4, 5, 6}
{7, 8, 9}
{1, 2, 3, 4, 5, 6, 7, 8, 9 }
{'e', 'r', 'p', 'a', 'apple', 'orange', 'pear'}
{'pear', 'orange', 'apple'}
{'pear', 'orange', 'apple', 'pear'}
{'orange', 'apple'}
{'语文': 89, '数学': 90, 100: '技术'}
{'语文': 89, '数学': 90, '技术':100}
{'语文': 89, '数学': 92, '技术':100}
'语文': 89, '数学': 90, 100: '技术'
int(num)
code(int(num))
code[int(num)]
code[num]
发表评论 取消回复