【判断题】
Python类的构造函数是init()。
A. 对
B. 错
查看试卷,进入试卷练习
微信扫一扫,开始刷题
答案
A
解析
暂无解析
相关试题
【判断题】
定义类时,在一个方法前面使用@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. 错
【判断题】
以读模式打开文件时,文件指针指向文件开始处。
A. 对
B. 错
【判断题】
以追加模式打开文件时,文件指针指向文件尾。
A. 对
B. 错
【判断题】
已知x = (1, 2, 3, 4),那么执行x[0] = 5之后,x的值为(5, 2, 3, 4)。
A. 对
B. 错
【判断题】
已知x = 3,那么执行x += 6语句前后x的内存地址是不变的。
A. 对
B. 错
【判断题】
成员测试运算符in作用于集合时比作用于列表快得多。
A. 对
B. 错
【判断题】
在Python 3.x中,使用内置函数input()接收用户输入时,不论用户输入的什么格式,一律按字符串进行返回。
A. 对
B. 错
【判断题】
安装Python扩展库时只能使用pip工具在线安装,如果安装不成功就没有别的办法了。
A. 对
B. 错
【判断题】
使用random模块的函数randint(1, 100)获取随机数时,有可能会得到100。
A. 对
B. 错
【判断题】
如果只需要math模块中的sin()函数,建议使用from math import sin来导入,而不要使用import math导入整个模块。
A. 对
B. 错
【判断题】
已知列表x = [1, 2, 3, 4],那么表达式x.find(5)的值应为-1。
A. 对
B. 错
【判断题】
列表对象的排序方法sort()只能按元素从小到大排列,不支持别的排序方式。
A. 对
B. 错
【判断题】
g = lambda x: 3不是一个合法的赋值表达式。
A. 对
B. 错
【判断题】
内置函数len()返回指定序列的元素个数,适用于列表、元组、字符串、字典、集合以及range、zip等迭代对象。
A. 对
B. 错
【判断题】
已知x和y是两个等长的整数列表,那么表达式sum((i*j for i, j in zip(x, y)))的作用是计算这两个列表所表示的向量的内积。
A. 对
B. 错
【判断题】
已知x和y是两个等长的整数列表,那么表达式[i+j for i,j in zip(x,y)]的作用时计算这两个列表所表示的向量的和。
A. 对
B. 错
【判断题】
表达式int(‘1’*64, 2)与sum(2**i for i in range(64))的计算结果是一样的,但是前者更快一些。
A. 对
B. 错
【判断题】
已知x = list(range(20)),那么语句del x[::2]可以正常执行。
A. 对
B. 错
【判断题】
已知x = list(range(20)),那么语句x[::2] = []可以正常执行。
A. 对
B. 错
【判断题】
已知x = list(range(20)),那么语句print(x[100:200])无法正常执行。
A. 对
B. 错
【判断题】
已知x是个列表对象,那么执行语句y = x之后,对y所做的任何操作都会同样作用到x上。
A. 对
B. 错
【判断题】
已知x是个列表对象,那么执行语句y = x[:]之后,对y所做的任何操作都会同样作用到x上。
A. 对
B. 错
【判断题】
在Python中,变量不直接存储值,而是存储值的引用,也就是值在内存中的地址。
A. 对
B. 错
推荐试题
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile As music plays an important role in our life, many music teachers and educators [ ] taking up a musical instrument at a young age
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile This rule should be entirely clear in the minds of everyone and should not be misunderstood under any [ ]
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile My daughter was shy; she was afraid to ask questions,[ ] to questions in class,or talk with other children
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile I got from him only a letter, which was put on my office desk; [ ] to the receipt of this letter I have never heard from him
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile The duties to provide services for children in need are not [ ] to the local social services department
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile We pray that all nations be [ ] and that all people around the world live in peace
【填空题】
controversial,assess, resolve,decrease,alter,abandon,indicate,undermine,compromise, conventional It was reported the president had [ ]to fight If war was necessary,even if it meant destroying his chances of re-election
【填空题】
controversial,assess, resolve,decrease,alter,abandon,indicate,undermine,compromise, conventional I had to [ ] one of my email accounts as it was filled with junk mail
【填空题】
controversial,assess, resolve,decrease,alter,abandon,indicate,undermine,compromise, conventional Darwin's theory of evolution remains[ ] partly because it challenges the religious belief that God created man
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile He suggested a small but [ ] improvement on our former plan; I really appreciate it.
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need, be/ get caught up in She held her hand above her eyes to [ ]them [ ] the sun so that she could see more clearly the man in front of her
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need, be/ get caught up in The boy studied the signs for over an hour,but still could not [ ]them, so he turned to his teacher for help
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need, be/ get caught up in They [ ] the developed countries to commit more money to protecting the environment
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need, be/ get caught up in We will continue to care for those [ ] and work to establish a society that is generous and prosperous
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need, be/ get caught up in Many people [ ]careers and raising kids so that they forget that their marriages also need to be taken good care of
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need, be/ get caught up in My most favorite program is the one that deals with scientific subjects that ordinary people can [ ]
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need, be/ get caught up in Finally, I would like to [ ]by saying that it has been a tremendous pleasure to work with you all
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need, be/ get caught up in He is a person that you always [ ]when you need help.
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need, be/ get caught up in This restaurant is very popular because it has some separate, smaller rooms [ ] families with small children
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need, be/ get caught up in Betty loves reading.[ ],“Reading is the most wonderful thing in the world.”
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in, Every one of you has made a contribution and I [ ] knowledging what each of you has done to make this academic convention such a success.
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in They all tried to talk [ ], but I couldn't hear anything they said
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in, Yellow flowers in the field always [ ] me [ ] my childhood in the countryside
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in, We have been practicing for so long and so hard that our team should [ ]winning the game
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in, Research on genes will [ ] exciting new medical treatments.,
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in, My family [ ] on my father's unemployment benefit after he lost his job
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in, Many subway riders read books or listent music in order to [ ] their time on the way to work
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in, In order to make sure he would be able to attend the meeting, I called him up two weeks [ ]
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in, In order to [ ]physical exercise, you have to exercise regularly and for at least half an hour each time
【填空题】
embarrass,polish, emotional, etticiency,curb ,await, donation ,dump,stuff ,historical Mary was a careful speaker, every word seemed to have been [ ] before it was allowed to escape through her lips
【填空题】
embarrass,polish, emotional, etticiency,curb ,await, donation ,dump,stuff ,historical He has a special feeling for the brilliant birds, and each spring he eagerly [ ] their return
【填空题】
embarrass,polish, emotional, etticiency,curb ,await, donation ,dump,stuff ,historical Thanks to the [ ] of air transport,everyone is free to go anywhere at any time
【填空题】
embarrass,polish, emotional, etticiency,curb ,await, donation ,dump,stuff ,historical John believes that the [ ] of food to the hungry is more helpful than giving money
【填空题】
embarrass,polish, emotional, etticiency,curb ,await, donation ,dump,stuff ,historical When she heard it was snowing in the city they were going to, she [ ] two more sweaters into her bag.
【填空题】
embarrass,polish, emotional, etticiency,curb ,await, donation ,dump,stuff ,historical During our stay in Europe we visited many places of [ ] interest, including several castles
【填空题】
embarrass,polish, emotional, etticiency,curb ,await, donation ,dump,stuff ,historical The wedding ceremony of my sister was a very [ ] experience for our family
【填空题】
embarrass,polish, emotional, etticiency,curb ,await, donation ,dump,stuff ,historical He was [ ]when he discovered that he didn't have enough money to pay for the red wine he had ordered
【填空题】
embarrass,polish, emotional, etticiency,curb ,await, donation ,dump,stuff ,historical The local government is pressed to find new places to [ ] dump waste
【填空题】
embarrass,polish, emotional, etticiency,curb ,await, donation ,dump,stuff ,historical The new system designed to [ ] harmful emissions排放物) from factories will be put into use soon
【填空题】
explore ,transmit, resource, emerge,yield, pose, assume, confidence,inherit, comprehensive It is so difficult to [ ] the bottom of the ocean because some parts are very deep.