信息
You have already completed the 测验 before. Hence you can not start it again.
You must sign in or sign up to start the 测验.
测验 complete. Results are being recorded.
0 of 37 问题 answered correctly
Your time:
时间已经过去了
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
-
题 1 of 37
-
题 2 of 37
2:
print(4 + 8 // 2)的输出结果是?
-
题 3 of 37
-
题 4 of 37
-
题 5 of 37
5:
关于print语句,下列选项能够正确输出的是?
-
题 6 of 37
6:
运行下列代码,d输出的结果是?( )
a,b,c=23,13,3
d=(a+b)-c**c
-
题 7 of 37
7:
下列代码段
star_number1=”star2″
star_number2=”star3″
print(star_number1+star_number2)
结果是?( )
-
题 8 of 37
8:
Python中的余数运算符是用哪个符号表示的?
-
题 9 of 37
-
题 10 of 37
10:
在turtle库中的指令,执行以下代码指令后,画笔为以下哪种状态?( )
import turtle
turtle.color(‘pink’)
turtle.pensize(5)
-
题 11 of 37
11:
下列代码的运行结果是?( )
import turtle
turtle.color(‘red’)
turtle.circle(100)
turtle.fillcolor(‘yellow’)
turtle.begin_fill()
turtle.circle(100,steps = 6)
turtle.end_fill()
-
题 12 of 37
12:
下列哪一段代码是海龟走到指定坐标然后左转90度?( )
-
题 13 of 37
-
题 14 of 37
14:
同学们排队做操,按名单顺序,每10个人一排,要问第n个人是第几排,下列哪一种方法可以实现?( )
-
题 15 of 37
15:
在Python IDLE中输入print(’Hello‘);print(‘I am Python’);,并将这两个语句写在一行,试分析,程序的运行结果是以下哪个选项?( )
-
题 16 of 37
16:
下列哪个命令可以将整个绘制屏幕的颜色设置成黑色?( )
-
题 17 of 37
17:
执行 print(3>2 or 4>5) 的结果是?( )
-
题 18 of 37
-
题 19 of 37
19:
为变量命名,并赋值为数字1,以下选项中,不符合要求的是?( )
-
题 20 of 37
20:
已知变量a = 5,执行下列哪个代码后,a的值为10。( )
-
题 21 of 37
-
题 22 of 37
22:
turtle.circle(90, 180)是绘制一个什么样的图形?( )
-
题 23 of 37
23:
下列代码执行后最有可能绘制出哪个图形?( )
import turtle
turtle.forward(100)
turtle.right(90)
turtle.forward(100)
turtle.right(45)
turtle.goto(0,0)
turtle.hideturtle()
-
题 24 of 37
24:
关于Python,下列哪个表述是正确的?( )
-
题 25 of 37
25:
print(6+8/2)输出的结果是?( )
-
题 26 of 37
26:
以下三种表示字符串的方式都是正确的。
”Hello“
‘不错‘
“我们一起走吧‘
-
题 27 of 37
27:
设置画布背景颜色只有turtle.bgcolor()一种方法。
-
题 28 of 37
28:
在IDLE中,要想新建Python脚本,在菜单里可以依次选择File—New File,即可新建Python脚本。
-
题 29 of 37
29:
在用IDLE脚本方式编写程序时,可以用ctrl+s快捷键保存代码。
-
题 30 of 37
30:
12number、my number、my_number都是有效的变量名。
-
题 31 of 37
31:
在Python的编程环境中,缩进的空格数是可以改变的,同一个代码块可以包含不相同的缩进空格数。
-
题 32 of 37
32:
每一个变量在使用前都必须赋值,赋值以后该变量才会被创建。
-
题 33 of 37
-
题 34 of 37
34:
在Python中,编程语言是不区分大小写的,如:print是打印函数,Print也是打印函数。
-
题 35 of 37
35:
year = input(“请输入您的出生年份:”)
print(“到了2030年,您的年龄是:”, 2030-year)
可以计算出2030年时的年龄。
-
题 36 of 37
36:
绘制如下图形 ,一个正方形,内有三个红点,中间红点在正方形中心。要求如下:
(1)正方形边长为200,线条为黑色;
(2)圆点的直径均为20 ,填充颜色为红色,画完后隐藏画笔;
(3)中间圆点的圆心位置为画布正中心,三个圆心之间距离相隔为40。

-
import turtle
turtle.penup()
turtle.goto(-100,100)
turtle.pendown()
for i in range(4):
turtle.forward(200)
turtle.right(90)
turtle.penup()
turtle.goto(0,0)
turtle.dot(20,"red")
turtle.goto(-40,0)
turtle.dot(20,"red")
turtle.goto(40,0)
turtle.dot(20,"red")
turtle.hideturtle()
-
题 37 of 37
37:
写一个计算长方形面积的程序,并对每行代码进行相应的注释,要求如下:
(1)采用多行注释,说明程序的功能(如下):
“计算长方形的面积
并输出结果”;
(2)设置第1个变量:用“a”表示长方形的长,并赋值为6;使用单行注释说明程序的功能;
(3)设置第2个变量:用“b”表示长方形的宽,并赋值为3;使用单行注释说明程序的功能;
(3)设置第3个变量:用“s”表示长方形的面积,并体现运算公式,使用单行注释说明程序功能;
(4)输出长方形的面积,运行结果格式为:“长方形的面积为:”并使用单行注释说明程序功能。