皮城大学测试题及答案.docVIP

  • 2
  • 0
  • 约3.66千字
  • 约 16页
  • 2026-05-15 发布于安徽
  • 举报

皮城大学测试题及答案

一、单项选择题

1.下列哪个不是Python的基本数据类型?

A.int

B.float

C.string

D.boolean

答案:D

2.在Python中,如何定义一个变量并赋值?

A.varx=5

B.x=5

C.definex=5

D.x:=5

答案:B

3.下列哪个是Python中的注释符号?

A.//

B.

C./

D.—

答案:B

4.Python中,哪个函数用于输入数据?

A.print()

B.input()

C.read()

D.get()

答案:B

5.下列哪个是Python中的字符串连接操作符?

A.

B.+

C.-

D./

答案:B

6.在Python中,如何获取字符串的长度?

A.str.length()

B.len(str)

C.str.size()

D.str.count()

答案:B

7.下列哪个是Python中的条件语句的关键字?

A.if

B.while

C.for

D.do

答案:A

8.在Python中,如何实现循环?

A.do-while

B.while

C.for

D.alloftheabove

答案:D

9.下列哪个是Python中的列表?

A.[1,2,3]

B.(1,2,3)

C.{1

文档评论(0)

1亿VIP精品文档

相关文档