刷题
导入试题
【判断题】
在定义函数时,某个参数名字前面带有一个*符号表示可变长度参数,可以接收任意多个普通实参并存放于一个元组之中。
A. 对
B. 错
查看试卷,进入试卷练习
微信扫一扫,开始刷题
答案
A
解析
暂无解析
相关试题
【判断题】
在定义函数时,某个参数名字前面带有两个*符号表示可变长度参数,可以接收任意多个关键参数并将其存放于一个字典之中。
A. 对
B. 错
【判断题】
定义函数时,带有默认值的参数必须出现在参数列表的最右端,任何一个带有默认值的参数右边不允许出现没有默认值的参数。
A. 对
B. 错
【判断题】
在调用函数时,可以通过关键参数的形式进行传值,从而避免必须记住函数形参顺序的麻烦。
A. 对
B. 错
【判断题】
在调用函数时,必须牢记函数形参顺序才能正确传值。
A. 对
B. 错
【判断题】
调用函数时传递的实参个数必须与函数形参个数相等才行。
A. 对
B. 错
【判断题】
正则表达式对象的match()方法可以在字符串的指定位置开始进行指定模式的匹配。
A. 对
B. 错
【判断题】
使用正则表达式对字符串进行分割时,可以指定多个分隔符,而字符串对象的split()方法无法做到这一点。
A. 对
B. 错
【判断题】
在编写函数时,建议首先对形参进行类型检查和数值范围检查之后再编写功能代码,或者使用异常处理结构,尽量避免代码抛出异常而导致程序崩溃。
A. 对
B. 错
【判断题】
执行语句 from math import sin 之后,可以直接使用 sin() 函数,例如 sin(3)。
A. 对
B. 错
【判断题】
列表对象的pop()方法默认删除并返回最后一个元素,如果列表已空则抛出异常。
A. 对
B. 错
【判断题】
在Python中定义类时,如果某个成员名称前有2个下划线则表示是私有成员。
A. 对
B. 错
【判断题】
在类定义的外部没有任何办法可以访问对象的私有成员。
A. 对
B. 错
【判断题】
可以使用py2exe或pyinstaller等扩展库把Python源程序打包成为exe文件,从而脱离Python环境在Windows平台上运行。
A. 对
B. 错
【判断题】
Python程序只能在安装了Python环境的计算机上以源代码形式运行。
A. 对
B. 错
【判断题】
不同版本的Python不能安装到同一台计算机上。
A. 对
B. 错
【判断题】
表达式 {1, 2} * 2 的值为 {1, 2, 1, 2}。
A. 对
B. 错
【判断题】
Python变量名区分大小写,所以student和Student不是同一个变量。
A. 对
B. 错
【判断题】
正则表达式元字符“^”一般用来表示从字符串开始处进行匹配,用在一对方括号中的时候则表示反向匹配,不匹配方括号中的字符。
A. 对
B. 错
【判断题】
正则表达式元字符“\s”用来匹配任意空白字符。
A. 对
B. 错
【判断题】
正则表达式 元字符“\d”用来匹配任意数字字符。
A. 对
B. 错
【判断题】
lambda表达式中可以使用任意复杂的表达式,但是必须只编写一个表达式。
A. 对
B. 错
【判断题】
Python类的构造函数是init()。
A. 对
B. 错
【判断题】
定义类时,在一个方法前面使用@classmethod进行修饰,则该方法属于类方法。
A. 对
B. 错
【判断题】
定义类时,在一个方法前面使用@staticmethod进行休息,则该方法属于静态方法。
A. 对
B. 错
【判断题】
通过对象不能调用类方法和静态方法。
A. 对
B. 错
【判断题】
在Python中可以为自定义类的对象动态增加新成员。
A. 对
B. 错
【判断题】
Python类不支持多继承。
A. 对
B. 错
【判断题】
属性可以像数据成员一样进行访问,但赋值时具有方法的优点,可以对新值进行检查。
A. 对
B. 错
【判断题】
文件对象是可以迭代的。
A. 对
B. 错
【判断题】
文件对象的tell()方法用来返回文件指针的当前位置。
A. 对
B. 错
【判断题】
以写模式打开的文件无法进读操作。
A. 对
B. 错
【判断题】
假设已成功导入os和sys标准库,那么表达式 os.path.dirname(sys.executable) 的值为Python安装目录。
A. 对
B. 错
【判断题】
只可以动态为对象增加数据成员,而不能为对象动态增加成员方法。
A. 对
B. 错
【判断题】
Python字典支持双向索引。
A. 对
B. 错
【判断题】
Python集合支持双向索引。
A. 对
B. 错
【判断题】
Python元组支持双向索引。
A. 对
B. 错
【判断题】
假设re模块已成功导入,并且有 pattern = re.compile(‘^’+’.’.join([r’\d{1,3}’ for i in range(4)])+’$’),那么表达式 pattern.match(‘192.168.1.103’) 的值为None。
A. 对
B. 错
【判断题】
假设random模块已导入,那么表达式 random.sample(range(10), 20) 的作用是生成20个不重复的整数。
A. 对
B. 错
【判断题】
假设random模块已导入,那么表达式 random.sample(range(10), 7) 的作用是生成7个不重复的整数。
A. 对
B. 错
【判断题】
在Python 3.x中reduce()是内置函数。
A. 对
B. 错
推荐试题
【单选题】
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
【单选题】
) 1. Even Tony’s six-year-old son asked him ______ smoking. A. stops B. stopped C. to stop D. stopping
A. A
B. B
C. C
D. D
【单选题】
2.—What do you think of the lecture of Li Yang’s Crazy English? — I think it’s _______ , but someone thinks it’s much too ________. A. wonderful enough; bored B. enough wonderful; boring C. enough wonderful; bored D. wonderful enough; boring
A. A
B. B
C. C
D. D
【单选题】
3.—He didn’t go to the lecture this morning, did he?    — _____ .Though he was not feeling very well. A. No, he didnt B. Yes; he did C. No, he did D. Yes, he didnt
A. A
B. B
C. C
D. D
【单选题】
4. If you read a lot, your life ______ full of pleasure. A. will be B. is C. be D. was
A. A
B. B
C. C
D. D
【单选题】
5. The black bag _________ be Annas. She has a blue one. A. should B. cant C. wouldnt D. could
A. A
B. B
C. C
D. D
【单选题】
6. Susan, why are you still here? They are all ready to start. Im sorry, but I _________ when to start. A. dont tell B. wasnt told C. didnt tell D. havent told
A. A
B. B
C. C
D. D
【单选题】
7.—Why dont you choose the red tie?    —For me, it doesn’t _____ my shirt very well. A. fix B. accept C. compare D. match
A. A
B. B
C. C
D. D
【单选题】
8. — Could you tell me ______? I must find him. — Sorry.I don’t know.But he was here just now. A. where Tom was B. where Tom is C. where has Tom gone D. where can I find Tom
A. A
B. B
C. C
D. D
【单选题】
9. —What did Mr Green say to you? — What a heavy rain! How did you come here? He asked________. A. at all B. in fact C. in surprise D. as a result
A. A
B. B
C. C
D. D
【单选题】
10. I often see Tom on the playground.When I passed the playground yesterday, I saw him . A. play; playing B. to play; play C. playing; to play D. playing; play
A. A
B. B
C. C
D. D
【单选题】
11. — Mum, could I have ____________ to drink? — Oh, dear.You can only drink some water.There is _________ in the kitchen. A. anything; else something B. anything; something else C. something; else nothing D. something; nothing else
A. A
B. B
C. C
D. D
【单选题】
12. We all know that learning a foreign language _______ time and effort. A. requires B. reduces C. removes D. repeats
A. A
B. B
C. C
D. D
【单选题】
13. Her son __________ Coke, but now he __________ milk. A. is used to drinking; used to drink B. used to drink; uses to drink C. used to drink; is used to drinking D. is used to drink; is drinking
A. A
B. B
C. C
D. D
【单选题】
14. I don’t know the teacher is talking with Miss Wang. A. what B. whom C. who D. which
A. A
B. B
C. C
D. D
【单选题】
15.Millie does __________ that many people are thankful to her. A. such an important and helpful job B. so important and helpful work C. a very important and helpful job D. such an important and helpful work
A. A
B. B
C. C
D. D
【单选题】
16. I think eating more vegetables is good _______ our health. —Yes, I agree _______ you. A. at, to B. for, with C. to, to D. for, to
A. A
B. B
C. C
D. D
【单选题】
17. I often go on holiday with my parents _____ summer. A. in B. at C. on D. of
A. A
B. B
C. C
D. D
【单选题】
18. I called you at 4:00 yesterday afternoon, but nobody answered. Sorry, I ______ with my friends at that time. A. had swum B. swam C. would swim D. was swimming
A. A
B. B
C. C
D. D
【单选题】
19.––Who is on the playground? ---__________.    A. Never B. None C. No one D. A lot
A. A
B. B
C. C
D. D
欢迎使用我爱刷题
×
微信搜索我爱刷题小程序
温馨提示
×
请在电脑上登陆“www.woaishuati.com”使用