【判断题】
Python变量名区分大小写,所以student和Student不是同一个变量。
查看试卷,进入试卷练习
微信扫一扫,开始刷题
相关试题
【判断题】
正则表达式元字符“^”一般用来表示从字符串开始处进行匹配,用在一对方括号中的时候则表示反向匹配,不匹配方括号中的字符。
【判断题】
正则表达式元字符“\s”用来匹配任意空白字符。
【判断题】
正则表达式 元字符“\d”用来匹配任意数字字符。
【判断题】
lambda表达式中可以使用任意复杂的表达式,但是必须只编写一个表达式。
【判断题】
Python类的构造函数是init()。
【判断题】
定义类时,在一个方法前面使用@classmethod进行修饰,则该方法属于类方法。
【判断题】
定义类时,在一个方法前面使用@staticmethod进行休息,则该方法属于静态方法。
【判断题】
在Python中可以为自定义类的对象动态增加新成员。
【判断题】
属性可以像数据成员一样进行访问,但赋值时具有方法的优点,可以对新值进行检查。
【判断题】
文件对象的tell()方法用来返回文件指针的当前位置。
【判断题】
假设已成功导入os和sys标准库,那么表达式 os.path.dirname(sys.executable) 的值为Python安装目录。
【判断题】
只可以动态为对象增加数据成员,而不能为对象动态增加成员方法。
【判断题】
假设re模块已成功导入,并且有 pattern = re.compile(‘^’+’.’.join([r’\d{1,3}’ for i in range(4)])+’$’),那么表达式 pattern.match(‘192.168.1.103’) 的值为None。
【判断题】
假设random模块已导入,那么表达式 random.sample(range(10), 20) 的作用是生成20个不重复的整数。
【判断题】
假设random模块已导入,那么表达式 random.sample(range(10), 7) 的作用是生成7个不重复的整数。
【判断题】
在Python 3.x中reduce()是内置函数。
【判断题】
以读模式打开文件时,文件指针指向文件开始处。
【判断题】
以追加模式打开文件时,文件指针指向文件尾。
【判断题】
已知x = (1, 2, 3, 4),那么执行x[0] = 5之后,x的值为(5, 2, 3, 4)。
【判断题】
已知x = 3,那么执行x += 6语句前后x的内存地址是不变的。
【判断题】
成员测试运算符in作用于集合时比作用于列表快得多。
【判断题】
在Python 3.x中,使用内置函数input()接收用户输入时,不论用户输入的什么格式,一律按字符串进行返回。
【判断题】
安装Python扩展库时只能使用pip工具在线安装,如果安装不成功就没有别的办法了。
【判断题】
使用random模块的函数randint(1, 100)获取随机数时,有可能会得到100。
【判断题】
如果只需要math模块中的sin()函数,建议使用from math import sin来导入,而不要使用import math导入整个模块。
【判断题】
已知列表x = [1, 2, 3, 4],那么表达式x.find(5)的值应为-1。
【判断题】
列表对象的排序方法sort()只能按元素从小到大排列,不支持别的排序方式。
【判断题】
g = lambda x: 3不是一个合法的赋值表达式。
【判断题】
内置函数len()返回指定序列的元素个数,适用于列表、元组、字符串、字典、集合以及range、zip等迭代对象。
【判断题】
已知x和y是两个等长的整数列表,那么表达式sum((i*j for i, j in zip(x, y)))的作用是计算这两个列表所表示的向量的内积。
【判断题】
已知x和y是两个等长的整数列表,那么表达式[i+j for i,j in zip(x,y)]的作用时计算这两个列表所表示的向量的和。
【判断题】
表达式int(‘1’*64, 2)与sum(2**i for i in range(64))的计算结果是一样的,但是前者更快一些。
【判断题】
已知x = list(range(20)),那么语句del x[::2]可以正常执行。
推荐试题
【单选题】
Tom is a book lover. ______ likes reading very much.
A. He B. She C. You D. It
【单选题】
—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
【单选题】
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
【单选题】
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
【单选题】
5. I was looking for a birthday gift for my mother, but I couldnt find ______ suitable.
A. anything B. something C. nothing D. everything
【单选题】
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
【单选题】
7. She ______ very hard since she came to our school.
A. studies B. has studied C. is studying D. studied
【单选题】
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
【单选题】
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
【单选题】
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
【单选题】
11. How do you like the dishes, Eric?
— Fantastic! Nothing tastes ________.
A. nice B. better C. terrible D. worse
【单选题】
12. ______ Lin Feng has to work late, she always wears a smile on her face.
A. Because B. If C. Until D. Though
【单选题】
13.You can save money _______ you buy cheaper things.
A. before B. unless C. if D. until
【单选题】
14. We will have a _________ holiday after the exam.
A. two-month B. two month’s C. two month D. two-months
【单选题】
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
【单选题】
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
【单选题】
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
【单选题】
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
【单选题】
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
【单选题】
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
【单选题】
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
【单选题】
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
【单选题】
23. It was dark, ______ I couldnt see what was happening.
A. or B. though C. but D. so
【单选题】
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
【单选题】
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
【单选题】
( ) 26. Where does the writer of "The little Prince" come from?
A.England. B.France. C.America. D.China.
【单选题】
( ) 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
【单选题】
( ) 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
【单选题】
( ) 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.
【单选题】
( ) 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.
【单选题】
( ) 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.
【单选题】
( ) 32. What may be the proper Chinese for the underlined part in the passage?
A.闲暇时光 B.学费 C.精神空虚 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.
【单选题】
( ) 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
【单选题】
( ) 35. Who came up with the phrase according to the passage?
A. Judy Foreman. B. Natalie Smith. C. Anne Herbert D. Alice Johnson.
【单选题】
( ) 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.
【单选题】
( ) 37.The greatest river for navigation is ___________.
A. the Nile B. the Amazon C. the Mekong D. the Mississippi
【单选题】
( ) 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
【单选题】
( ) 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
【单选题】
( ) 40. The best title of the passage is ___________.
A. Rivers in Cities B. The importance of Rivers
C. Transportation D. Natural Resources