青少年软件编程(Python一级)等级考试试卷(2021年6月)
sworld
helloworld
hello
world
Computer
P
3_1
_WO1
3
4.5
4
4.0
print("World" "2021")
print("World" "20" "21")
print("World" 2021)
print("World2021")
144
24
48
6
①②
②③
①③
①②③
*
X
x
#
.py
.png
.doc
abc=5
a=5,b=5,c=5
a=b=c=5
a=5 b=5 c=5
import turtle\nturtle.circle(150,steps=3)\nturtle.hideturtle()\nturtle.done()
import turtle\nturtle.circle(150,3)\nturtle.hideturtle()\nturtle.done()
import turtle\nturtle.circle(3)\nturtle.hideturtle()\nturtle.done()
import turtle\nturtle.circle(150,3,3)\nturtle.hideturtle()
移至初始坐标 (0,0)
移至初始坐标 (0,0),并设置朝向为初始方向
移至屏幕左上角
设置朝向为初始方向
色彩处理时,可以使用彩色画笔pencolor( ),也可以直接由color( )方法更改目前画笔的颜色
penup()指的是将笔提起,不会绘制任何图形
在选择画笔粗细时可以使用pensize()
在海龟绘图中,画布中央是(0,0),往右X坐标值递减,往左X坐标值递增
1
1.0
9
9.0
88
80
88-8
81
turtle.color('blue')表示的含义为:设置轮廓和填充颜色均为"blue"
turtle.fllcolor('yellow')表示的含义为:设置填充颜色为"yellow"
程序运行结果为:绘制两个圆,左边圆填充颜色为"yellow",右边圆的颜色为"aqua"
最终绘制两个圆的轮廓颜色均为"blue"
#这个是一个程序
/这个是一个程序/
"这是一个程序"
?这是一个程序?
10
1/3
5.2
5
left()
right()
back()
forward()
编辑器
编译器
计算器
集成开发环境
d % 7
(d - 1) % 7
(d - 1) % 7 1
(d 1) % 7
(10,0)
(10,20)
(10,30)
(10,-20)
<
>
=!
=
on
no
word3
word2word1
class
if
turtle
or
import turtle\nturtle.pencolor('blue')\nturtle.fillcolor('red')\nturtle.begin_fill()\nturtle.circle(200)\nturtle.end_fill()
import turtle\nturtle.pencolor('blue')\nturtle.fillcolor('red')\nturtle.begin_fill()\nturtle.circle(100, 360)\nturtle.end_fill()
import turtle\nturtle.color('blue')\nturtle.dot(200)
import turtle
turtle.pencolor('blue')
turtle.fillcolor('red')
turtle.dot(100)
发表评论 取消回复