刷题
导入试题
【判断题】
列表可以作为字典的“键”。
A. 对
B. 错
查看试卷,进入试卷练习
微信扫一扫,开始刷题
答案
B
解析
暂无解析
相关试题
【判断题】
元组可以作为字典的“键”。
A. 对
B. 错
【判断题】
字典的“键”必须是不可变的。
A. 对
B. 错
【判断题】
尽管可以使用import语句一次导入任意多个标准库或扩展库,但是仍建议每次只导入一个标准库或扩展库。
A. 对
B. 错
【判断题】
为了让代码更加紧凑,编写Python程序时应尽量避免加入空格和空行。
A. 对
B. 错
【判断题】
在Python 3.5中运算符+不仅可以实现数值的相加、字符串连接,还可以实现列表、元组的合并和集合的并集运算。
A. 对
B. 错
【判断题】
已知x为非空列表,那么表达式 sorted(x, reverse=True) == list(reversed(x)) 的值一定是True。
A. 对
B. 错
【判断题】
已知x为非空列表,那么x.sort(reverse=True)和x.reverse()的作用是等价的。
A. 对
B. 错
【判断题】
生成器推导式比列表推导式具有更高的效率,推荐使用。
A. 对
B. 错
【判断题】
Python集合中的元素不允许重复。
A. 对
B. 错
【判断题】
Python集合可以包含相同的元素。
A. 对
B. 错
【判断题】
Python字典中的“键”不允许重复。
A. 对
B. 错
【判断题】
Python字典中的“值”不允许重复。
A. 对
B. 错
【判断题】
Python集合中的元素可以是元组。
A. 对
B. 错
【判断题】
Python集合中的元素可以是列表。
A. 对
B. 错
【判断题】
Python字典中的“键”可以是列表。
A. 对
B. 错
【判断题】
Python字典中的“键”可以是元组。
A. 对
B. 错
【判断题】
Python列表中所有元素必须为相同类型的数据。
A. 对
B. 错
【判断题】
Python列表、元组、字符串都属于有序序列。
A. 对
B. 错
【判断题】
在Python 3.x中语句 print(*[1,2,3]) 不能正确执行。
A. 对
B. 错
【判断题】
已知A和B是两个集合,并且表达式A < B的值为False,那么表达式A > B的值一定为True。
A. 对
B. 错
【判断题】
列表对象的append()方法属于原地操作,用于在列表尾部追加一个元素。
A. 对
B. 错
【判断题】
对于列表而言,在尾部追加元素比在中间位置插入元素速度更快一些,尤其是对于包含大量元素的列表。
A. 对
B. 错
【判断题】
假设有非空列表x,那么x.append(3)、x = x+[3]与x.insert(0,3)在执行时间上基本没有太大区别。
A. 对
B. 错
【判断题】
使用Python列表的方法insert()为列表插入元素时会改变列表中插入位置之后元素的索引。
A. 对
B. 错
【判断题】
假设x为列表对象,那么x.pop()和x.pop(-1)的作用是一样的。
A. 对
B. 错
【判断题】
使用del命令或者列表对象的remove()方法删除列表中元素时会影响列表中部分元素的索引。
A. 对
B. 错
【判断题】
带有else子句的循环如果因为执行了break语句而退出的话,则会执行else子句中的代码。
A. 对
B. 错
【判断题】
对于带有else子句的循环语句,如果是因为循环条件表达式不成立而自然结束循环,则执行else子句中的代码。
A. 对
B. 错
【判断题】
已知列表 x = [1, 2, 3],那么执行语句 x = 3 之后,变量x的地址不变。
A. 对
B. 错
【判断题】
在UTF-8编码中一个汉字需要占用3个字节。
A. 对
B. 错
【判断题】
在GBK和CP936编码中一个汉字需要2个字节。
A. 对
B. 错
【判断题】
如果仅仅是用于控制循环次数,那么使用for i in range(20)和for i in range(20, 40)的作用是等价的。
A. 对
B. 错
【判断题】
使用列表对象的remove()方法可以删除列表中首次出现的指定元素,如果列中不存在要删除的指定元素则抛出异常。
A. 对
B. 错
【判断题】
元组是不可变的,不支持列表对象的inset()、remove()等方法,也不支持del命令删除其中的元素,但可以使用del命令删除整个元组对象。
A. 对
B. 错
【判断题】
Python字典和集合属于无序序列。
A. 对
B. 错
【判断题】
无法删除集合中指定位置的元素,只能删除特定值的元素。
A. 对
B. 错
【判断题】
元组的访问速度比列表要快一些,如果定义了一系列常量值,并且主要用途仅仅是对其进行遍历二不需要进行任何修改,建议使用元组而不使用列表。
A. 对
B. 错
【判断题】
当以指定“键”为下标给字典对象赋值时,若该“键”存在则表示修改该“键”对应的“值”,若不存在则表示为字典对象添加一个新的“键-值对”。
A. 对
B. 错
【判断题】
假设x是含有5个元素的列表,那么切片操作x[10:]是无法执行的,会抛出异常。
A. 对
B. 错
【判断题】
只能对列表进行切片操作,不能对元组和字符串进行切片操作。
A. 对
B. 错
推荐试题
【单选题】
Tom is a book lover. ______ likes reading very much. A. He B. She C. You D. It
A. A
B. B
C. C
D. D
【单选题】
—May I listen to the music here, Mr. White? —Sorry, you’d better it like that. A. not to do B. not do to C. dont do D. not do
A. A
B. B
C. C
D. D
【单选题】
3.—Did you have a good time at Lauras birthday party? — Yes, indeed. Its several years ________ I enjoyed myself so much. A. when B. before C. since D. that
A. A
B. B
C. C
D. D
【单选题】
4. —___________ is the Summer Palace from here? About three kilometers away. You can take the No. 35 bus. A. How long B. How far C. How often D. How much
A. A
B. B
C. C
D. D
【单选题】
5. I was looking for a birthday gift for my mother, but I couldnt find ______ suitable. A. anything B. something C. nothing D. everything
A. A
B. B
C. C
D. D
【单选题】
6. A friend of my ____ and I are going to visit_______ next week. A. father; Browns B. father's; Browns C. father; the Browns D. father's; the Browns
A. A
B. B
C. C
D. D
【单选题】
7. She ______ very hard since she came to our school. A. studies B. has studied C. is studying D. studied
A. A
B. B
C. C
D. D
【单选题】
8. — Who will send you to the new school, your mom or your dad? — _______. Ill go there by myself. A. Both B. Either C. Neither D. None
A. A
B. B
C. C
D. D
【单选题】
9.—Well do what we can ____English well this term. —It’s high time for you to work hard. A. study  B.to study  C. be studied   D. be studying
A. A
B. B
C. C
D. D
【单选题】
10. —I’m going to Flower Bookstore. Could you tell me ______? — Sorry, I don’t know. I’m new here. A. where it is B. where was it C. where is it D. where it was
A. A
B. B
C. C
D. D
【单选题】
11. How do you like the dishes, Eric? — Fantastic! Nothing tastes ________. A. nice B. better C. terrible D. worse
A. A
B. B
C. C
D. D
【单选题】
12. ______ Lin Feng has to work late, she always wears a smile on her face. A. Because B. If C. Until D. Though
A. A
B. B
C. C
D. D
【单选题】
13.You can save money _______ you buy cheaper things. A. before B. unless C. if D. until
A. A
B. B
C. C
D. D
【单选题】
14. We will have a _________ holiday after the exam. A. two-month B. two month’s C. two month D. two-months
A. A
B. B
C. C
D. D
【单选题】
15. —We will build an underground in Xuzhou before 2015. — Wow, _______! Will it pass our place? A. what an excited news B. how excited the news is C. what exciting news D. how exciting
A. A
B. B
C. C
D. D
【单选题】
16. — Emily, here’s a dictionary.I hope it will help you in some way. — Thank you.It’s ________ what I need. A. almost B. still C. only D. just
A. A
B. B
C. C
D. D
【单选题】
17. —Oh.I’m hungry.Mum, can I have the hamburger on the plate? —No.It tastes . A. terribly B. terrible C. good D. well
A. A
B. B
C. C
D. D
【单选题】
18. —We can invite our teachers to the farewell party next Saturday. —Yes, ______? I’ll call them at once. A. what for B. what C. why not D. why
A. A
B. B
C. C
D. D
【单选题】
19.You can ________ ask the old man to move away to any other place because he has lived ________ here for at least sixty years. A. hardly; alone B. hard; alone C. hardly; lonely D. hardly; lonely
A. A
B. B
C. C
D. D
【单选题】
20.—I’m going back to see my grandparents this weekend. —________. A. It’s very nice of you B. You’d better hurry C. Say goodbye to them D. Give my best wishes to them
A. A
B. B
C. C
D. D
【单选题】
21.—Why not take ____ umbrella with the sign “Made in China”? It is useful. —What _______ good advice it is!    A. an; a B. a; a C. an; \ D. \; a
A. A
B. B
C. C
D. D
【单选题】
22. —Do you know the boy________ is sitting next to Peter? — Yes. He is Peter’s friend. They are celebrating his ________ birthday. A. who; ninth B. that; ninth C. /; ninth D. which; ninth
A. A
B. B
C. C
D. D
【单选题】
23. It was dark, ______ I couldnt see what was happening. A. or B. though C. but D. so
A. A
B. B
C. C
D. D
【单选题】
24.—You can use MSN to talk with Vivien on the Internet. —I know. But can you tell me ________? A. what I can use it B. when I can use it C. why can I use it D. how can I use it
A. A
B. B
C. C
D. D
【单选题】
25. _______ are you going to the School Uniform Exhibition, Amy ? To learn about different styles of school uniform. A. What B. Where C. Which D. Why
A. A
B. B
C. C
D. D
【单选题】
( ) 26. Where does the writer of "The little Prince" come from? A.England. B.France. C.America. D.China.
A. A
B. B
C. C
D. D
【单选题】
( ) 27. What does the prince do after the fox tells him a secret? A.He cares more about a flower and a sheep. B.He meets many more strange adults on other planets. C.He realizes his love for the rose and he goes back to his planet.   D.He discovers interesting things such as a snake, other roses and a fox
A. A
B. B
C. C
D. D
【单选题】
( ) 28. What does "The little Prince" mainly talk about? It' s about _________. A.the adult world B.the planet B -612 C.a rose and a fox D.the adventure of a young prince
A. A
B. B
C. C
D. D
【单选题】
( ) 29. What is the writer's main purpose(目的)in writing this passage?    A.To tell the readers his life story.    B.To tell people what kind of person his father was.    C.To tell the readers what present he got from his father.    D. To let people know how poor he was.
A. A
B. B
C. C
D. D
【单选题】
( ) 30. Why did the father not ask his son not to do this and do that?    A.Because he felt quite confident of his son.    B.Because he was born from a poor family.    C.Because he was a man of few words.    D.Because he didn't want to be much too strict with his son.
A. A
B. B
C. C
D. D
【单选题】
( ) 31. What would someone learn from this passage?    A.How to live by oneself. B.How to stand on one's own feet.    C.What a good father should do. D.What the self-important is like.
A. A
B. B
C. C
D. D
【单选题】
( ) 32. What may be the proper Chinese for the underlined part in the passage?    A.闲暇时光 B.学费 C.精神空虚 D.经济不足
A. A
B. B
C. C
D. D
【单选题】
( ) 33. Why did Natalie Smith pay for the six cars behind her? A. She had seven tickets. B. She hoped to please others. C. She knew the car drivers well. D. She wanted to show kindness.
A. A
B. B
C. C
D. D
【单选题】
( ) 34. Judy Foreman copied down the phrase because she ___ . A. thought it was beautifully written B. wanted to know what it really meant C. decided to write it on a warehouse wall D. wanted her husband to put it up in the classroom
A. A
B. B
C. C
D. D
【单选题】
( ) 35. Who came up with the phrase according to the passage? A. Judy Foreman. B. Natalie Smith. C. Anne Herbert D. Alice Johnson.
A. A
B. B
C. C
D. S
【单选题】
( ) 36. What can we infer from the last paragraph? A. People should practice random kindness to those in need. B. People who receive kindness are likely to offer it to others. C. People should practice random kindness to strangers they meet. D. People who receive kindness are likely to pay it back to the giver.
A. A
B. B
C. C
D. D
【单选题】
( ) 37.The greatest river for navigation is ___________. A. the Nile B. the Amazon C. the Mekong D. the Mississippi
A. A
B. B
C. C
D. D
【单选题】
( ) 38. From a dam, people can use the water for ___________. A. keeping the rivers clean B. only making electricity C. irrigation and making electricity D. washing clothes
A. A
B. B
C. C
D. D
【单选题】
( ) 39. The water in the river is polluted because of _____________. A. people's drinking water too much B. people's swimming in the river too much C. chemicals and other materials D. people's building a dam across a river
A. A
B. B
C. C
D. D
【单选题】
( ) 40. The best title of the passage is ___________. A. Rivers in Cities B. The importance of Rivers C. Transportation D. Natural Resources
A. A
B. B
C. C
D. D
欢迎使用我爱刷题
×
微信搜索我爱刷题小程序
温馨提示
×
请在电脑上登陆“www.woaishuati.com”使用