#132. CIE Python 一级 2024年06月 客观题

CIE Python 一级 2024年06月 客观题

选择题

  1. 在使用turtle绘制图形时,如果要控制小海龟移动到 x 坐标为 200,y 坐标为150 的位置,以下代码能够实现效果的是?( ) {{ select(1) }}
  • turtle.go(150, 200)
  • turtle.go(200, 150)
  • turtle.goto(150, 200)
  • turtle.goto(200, 150)
  1. 下列关于Python程序设计语言的说法,错误的是?( ) {{ select(2) }}
  • Python 是一门面向对象的编程语言
  • Python 程序文件后缀是 .py
  • Python 程序只能在 IDLE 上运行
  • Python 程序支持多种操作系统
  1. 在Python中,使用type()函数可以获取参数的数据类型,那么运行type("int")的运行结果是?( ) {{ select(3) }}
  • <class 'int'>
  • <class 'str'>
  • <class 'float'>
  • <class 'bool'>
  1. 使用下列哪一项可以导入turtle画图模块?( ) {{ select(4) }}
  • import turtle
  • import Turtle
  • turtle import
  • import turtle.Turtle
  1. 使用turtle.circle(4,360,6)绘制的是什么图形?( ) {{ select(5) }}
  • 半径为4的圆
  • 半径为360的圆
  • 六边形
  • 正方形
  1. 下列表达式的结果最大的是?( ) {{ select(6) }}
  • 20%4
  • 20**2
  • 20*4
  • 20//4
  1. 程序1
a = 5 > 4 + 2
print(a)

程序2

b = 5 > 4 + 2
print(b)

的运行结果分别是?( ) {{ select(7) }}

  • 3 False
  • True 2
  • True 3
  • 3 True
  1. 下列关于turtle.circle()turtle.dot()指令说法正确的是?( ) {{ select(8) }}
  • turtle.circle()指令只能绘制圆或者圆弧
  • turtle.circle()的参数为直径,turtle.circle(30)绘制的图形半径为15
  • turtle.dot()指令的作用是绘制圆点
  • turtle.dot()的参数为半径,turtle.dot(30)绘制的图形半径为30
  1. 关于turtle库说法正确的是?( ) ①画布的位置是固定的,无法调整
    write()指令可以在画布中添加文字
    goto(100,100)指的是将画笔移动到坐标为(100,100)的位置上
    dot(100)可以绘制出一个半径为100的圆
    {{ select(9) }}
  • ①②
  • ①③
  • ②③
  • ③④
  1. 在Turtle库中,既可以设置画笔颜色,又可以设置填充颜色的指令是?( ) {{ select(10) }}
  • turtle.color()
  • turtle.bgcolor()
  • turtle.pencolor()
  • turtle.fill_color()
  1. 假设a="吉祥";b="如意";c="a"+"b";print(c),请问输出结果是?( ) {{ select(11) }}
  • 吉祥 如意
  • 吉祥如意
  • ab
  • a+b
  1. 如果你今年的年龄是10周岁,则运行下面的程序,在提示语后面输入10后,c的值为多少?( )
a=input('请输入你的年龄:')
c=a+2

{{ select(12) }}

  • 12
  • 102
  • 程序出错
  • '10+2'
  1. Python中如何计算得到2024除以3的余数?( ) {{ select(13) }}
  • 2024%3
  • 2024//3
  • 2024/3
  • 2024\3
  1. 下列各语句输出结果为True的是?( ) {{ select(14) }}
  • print((0>1)or(2>1))
  • print(not 1)
  • print((1>=0)and(1>=2))
  • print(True!=1)
  1. 在Python中,表达式6-3*2的结果是?( ) {{ select(15) }}
  • 0
  • 6
  • 12
  • 1
  1. 在Python中,以下哪个表达式的结果与其他三个不同?( ) {{ select(16) }}
  • True and False
  • not False
  • 3<4
  • 4!=5
  1. 运行下面IDLE中的代码,应使用哪个选项中的功能?( )
print("Hello World")

{{ select(17) }}

  • File中的Open
  • Edit中的Undo
  • Run中的Run Module
  • Options中的Configure IDLE
  1. 执行下面的代码,打印结果为?( )
# print('锲而舍之,朽木不折;')
print('锲而不舍,金石可镂。')

{{ select(18) }}

  • 锲而舍之,朽木不折;
    锲而不舍,金石可镂。
    
  • 锲而不舍,金石可镂。
    锲而舍之,朽木不折;
    
  • 锲而舍之,朽木不折;
    
  • 锲而不舍,金石可镂。
    
  1. 执行代码 print(17 or 39),打印结果为?( ) {{ select(19) }}
  • True
  • False
  • 17
  • 39
  1. 阿明在一条小河边取水,他有两个水桶,一个红色一个绿色。红色水桶的容量是6升,绿色水桶的容量是7升。阿明想在红色水桶中正好装入5升水,他该怎么做呢?下面给出了八项操作,选择其中的一部分就能在红色水桶中正好装入5升水。哪个选项中的操作顺序能够达到目标?( ) ① 将红色水桶装满;
    ② 将绿色水桶装满;
    ③ 第二次将红色水桶装满;
    ④ 第二次将绿色水桶装满;
    ⑤ 将红色水桶中的水全部倒入绿色水桶;
    ⑥ 将绿色水桶中的水全部倒入红色水桶;
    ⑦ 将红色水桶中的水倒入绿色水桶,直到绿色水桶装满;
    ⑧ 将绿色水桶中的水倒入红色水桶,直到红色水桶装满;
    {{ select(20) }}
  • ②①⑦③
  • ①⑤⑧④
  • ②⑧④⑤
  • ①⑤③⑦
  1. 下面哪个选项的代码,可以画出一个直径为80的红色空心圆形?( ) {{ select(21) }}
  • import turtle
    turtle.color('red')
    turtle.circle(40)
    
  • import turtle
    turtle.color('red')
    turtle.dot(80)
    
  • import turtle
    turtle.color('red')
    turtle.begin_fill()
    turtle.circle(40)
    turtle.end_fill()
    
  • import turtle
    turtle.pencolor('red')
    turtle.begin_fill()
    turtle.dot(80)
    turtle.end_fill()
    
  1. print("16+2")输出的结果是?( ) {{ select(22) }}
  • "16+2"
  • 18
  • 162
  • 16+2
  1. 下面哪个选项可以作为 Python 的变量名?( ) {{ select(23) }}
  • for
  • if
  • else
  • Break
  1. 以下运算符中,运算优先级最高的是?( ) {{ select(24) }}
  • <=
  • or
  • ==
  • %
  1. 已知变量a=8b=7,执行语句a*=a-b后,变量a的值为以下哪一个?( ) {{ select(25) }}
  • -8
  • 8
  • -7
  • 7

判断题

  1. Python无论在哪个编译器中编写代码,编写完一行代码后,回车就会马上运行出现输出结果。( ) {{ select(26) }}
  • 正确
  • 错误
  1. toy = '足球' 这句代码中,toy 是变量的名字。( ) {{ select(27) }}
  • 正确
  • 错误
  1. 运行str(49)的结果是'49'。( ) {{ select(28) }}
  • 正确
  • 错误
  1. 以下Python语句的运行结果是“hello world”。( )
print("hello",end='  ')
print("world")

{{ select(29) }}

  • 正确
  • 错误
  1. 在Python编程中,input()为输入函数,在输入数据时,可以将输入数据直接显示到控制台。( ) {{ select(30) }}
  • 正确
  • 错误
  1. 在Python中允许同时为多个变量进行赋值,故赋值语句:a,b,c = 1,2,3,4是正确的。( ) {{ select(31) }}
  • 正确
  • 错误
  1. Python3的代码可以直接在Python2上运行。( ) {{ select(32) }}
  • 正确
  • 错误
  1. 在Python中,andorTrueFalse都是保留字。( ) {{ select(33) }}
  • 正确
  • 错误
  1. hideturtle() 可以将画笔移动到起始位置。( ) {{ select(34) }}
  • 正确
  • 错误
  1. turtle库中,turtle.begin_fill()turtle.end_fill()必须成对使用。( ) {{ select(35) }}
  • 正确
  • 错误