PROBLEM SET
题库
按难度与知识点筛选,找到适合的练习题。
题目列表
共 67434 题
A43223
运行以下程序,不会出现哪些结果( )?lst1=[1,3,5,7,8]lst2=[2,2,7,9,7]for i in lst1: for j in lst2: if i+j ==10: passprint(i,j)
NOC-Python-L1
中等
--
A43224
要想绘制出如下图形,代码①、②处应填写为( )。t = turtle.Pen()turtle.bgcolor("#000066")def sunflower(): t.color('red','yellow') t.begin_fill() for i in range(_①_): t.forward(200) t.left(170) t.end_fill() _②_turtle.done()
NOC-Python-L1
中等
--
A43225
下面代码的输出结果不会是()d = {"苹果":'红色',"梨":'黄色',"可乐":'黑色'}print(d["梨"],d.get('可乐','红色'))
NOC-Python-L1
中等
--
A43226
元组是⼀种常⻅的数据类型,下面哪些选项是元组的特点?( )
NOC-Python-L1
中等
--
A43227
下面哪些表达式的结果为数字类型( )?
NOC-Python-L1
中等
--
A43228
运行以下程序,变量'i'的值为()?a = 1i = 0while a <=100: a += 7 i += 5print(i)
NOC-Python-L1
中等
--
A43229
运行下面代码,显示的结果是( )?import turtle as tt.right(120)t.forward(100)t.right(120)t.forward(100)t.right(120)t.done()
NOC-Python-L1
中等
--
A43230
阅读下⾯程序,补充在空位①,②数字,输出结果为2的选项( )。def func(n,m): if n==0: return -1 s=0 for i in range(2,n+1): s = (s+m) % 1 return sprint(func(__①__,__②__))
NOC-Python-L1
中等
--
A43231
下面可以通过int()或float()转换的选项是( )?
NOC-Python-L1
中等
--
A43232
运行以下程序的结果是( )。l1 = [1, 3, 4, 5, 7, 8]l2 = [1, 4, 5, 6, 7, 9]temp = []for i in l2: if (i not in l1): l1.append(i) l2.append(i) else: temp.append((i ** 2))
NOC-Python-L1
中等
--
A43233
运行下列代码,输出结果是()x = [[1,2,3],[4,5,6],[7,8,9]]y = 0for i in x: for j in range(3): y += i[j]print(y)
NOC-Python-L1
中等
--
A43234
当用户输入ace时,下面代码的输出结果是:try: a = 0 a = input("请输入一个整数: ") def X(a): return a**10except: print("出现错误")
NOC-Python-L1
中等
--
A43235
下面代码的输出结果是( )?x=123.45 print(type(x))
NOC-Python-L1
中等
--
A43236
在使用Python操作⽂件时,哪个选项可以打开⽂件“codemao.txt”并写⼊内容( )?
NOC-Python-L1
中等
--
A43237
以下选项中不符合Python语言变量命名规则的是()?
NOC-Python-L1
中等
--
A43238
某⻆⾊脚本如下,运⾏脚本,则新建对话框输出的内容是________。注:仅填写数字或英⽂,勿填写汉字或其他字符
NOC-Scratch-L1
困难
--
A43239
已知某⻆⾊初始⾯向⻆度为0度,想要使⽤下列脚本绘制出如下的图形,则“?”处应填写___________。注:仅填写数字,勿填写其他⽂字或空格
NOC-Scratch-L1
困难
--
A43240
已知下图脚本运⾏之后,新建对话框显示64,则“?”处应填写____。注:请填写数字,勿填写其他多余字符
NOC-Scratch-L1
困难
--
A43241
已知列表“奇数库”和“偶数库”都是空列表,运⾏下⾯积木后,“偶数库”储存了__________个偶数。注:请填写数字,勿填写其他多余字符
NOC-Scratch-L1
困难
--
A43242
运⾏下图所示的脚本,新建对话框输出的内容为__________。注:仅填写数字,勿填写汉字或其他字符
NOC-Scratch-L1
困难
--