PROBLEM SET
题库
按难度与知识点筛选,找到适合的练习题。
题目列表
共 67434 题
A29451
现有集合 items= set(("spring","summer","seasons”,"Autumn","Winter”),第一次使用语句items. pop "seasons ”),一定可以删除元素"seasons"。 ( )
电子学会-Python-L5
困难
--
A29452
学校运动会上,小卢同学用Python写了一个汇总程序,在他的程序中参赛项目集合的元素是可以相同的。( )
电子学会-Python-L5
困难
--
A29453
若列表lst=[1,2,4-1,2],则执行“print(lst[1:4:2][1])”语句后输出的结果为-1。( )
电子学会-Python-L5
困难
--
A29454
小明给自己的玩具建立了一个玩具字典为dict1={车'大卡车'变形金刚'擎天柱’,变形车"擎天柱”。( )
电子学会-Python-L5
困难
--
A29455
range(20,0,-2)表示从20倒序遍历到0,共遍历了11次,步长为2。( )
电子学会-Python-L5
困难
--
A29456
字符串的rfind(0)方法是用来查找一个字符串在另一个字符串指定范围中首次出现的位置,如果不存在,则返回-1。( )
电子学会-Python-L5
困难
--
A29457
在Python的datetime模块中,下面哪个方法可以获取当前时间?( )
电子学会-Python-L5
困难
--
A29458
阅读以下代码,描述错误的选项是?( )import wordcloudtxt="Nothing is impossible!"w=wordcloud.WordCloud(background color="white")w.generate(txt)w.to_file('px.png')
电子学会-Python-L5
困难
--
A29459
以下不属于jieba库分词的三种模式的选项是?( )
电子学会-Python-L5
困难
--
A29460
下列语句能随机生成一位[10,20]范围之间正整数的语句是?( )
电子学会-Python-L5
困难
--
A29461
执行如下Python程序,得到的结果是?( )cnt=0for i in range(0,10): for j in range(i,10): if i+j==10: cnt+=1print(cnt)
电子学会-Python-L5
困难
--
A29462
下列语句的输出结果是?( )for i in range(6): if i%2==0: continue else: print(i,end=',')
电子学会-Python-L5
困难
--
A29463
输出"12963",下列程序不正确的是?( )
电子学会-Python-L5
困难
--
A29464
有如下Python程序段numbers=[]for i in range(1,101): if i%11==2 and i%5==3: numbers.append(i) print(numbers)执行该段程序后,输出的结果是?( )
电子学会-Python-L5
困难
--
A29465
下列关于Python语言中元组数据类型的说法,错误的是?( )
电子学会-Python-L5
困难
--
A29466
运行以下程序,输出结果是?( )t1=(1,3,5)t2=(2,4,6)t3=((i**2)for i in t2)print(tuple(t3))
电子学会-Python-L5
困难
--
A29467
有如下程序段,程序运行后输出的结果是?( )set1 = {1,2,3, 4}set2 = {3, 4,5, 6}difference = set1-set2print(difference)
电子学会-Python-L5
困难
--
A29468
集合是Pvthon语言提供的内置数据结构,与列表、字典一样都属于可变类型的序列。集合是没有value的字典,集合中的元素不允许复,不允许修改,下列说法正确的是?( )
电子学会-Python-L5
困难
--
A29469
有如下Python程序段,程序运行后,输出的结果是?( )S="PYTHON"a,b=s[:3],s[4:]print(a+b)
电子学会-Python-L5
困难
--
A29470
已知list=["Word","for","sent","city","piano"],则list[3][2]的返回值为?( )
电子学会-Python-L5
困难
--