Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson15-diy2
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3bd5f1c2
authored
Nov 09, 2025
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
bae41ef6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
0 deletions
gyif.py
my_tree.py
gyif.py
0 → 100644
View file @
3bd5f1c2
'''name=input("g")
you=input("p")
hobby=input("d")
print("你好",name,"我喜欢在",you,"做",hobby)
name=input("你的名字是什么")
you=input("你最喜欢的地方是什么")
hobby=input("你的爱好是什么")
print("你好",name,"我喜欢在",you,"做",hobby,"你呢?")
u=input("你好,主任,有什么问题吗?")
print("你提出的",u,"我不会")
u=input("你")
if u=="无"
print("拜拜")'''
color
=
input
(
"请输入五角星的颜色"
)
size
=
int
(
input
(
"请输入五角星的大小(整数):"
))
import
turtle
t
=
turtle
.
Pen
()
t
.
pencolor
(
color
)
t
.
pensize
(
size
)
t
.
fillcolor
(
color
)
t
.
begin_fill
()
for
i
in
range
(
5
):
t
.
forward
(
234
)
t
.
right
(
144
)
t
.
end_fill
()
turtle
.
done
()
my_tree.py
0 → 100644
View file @
3bd5f1c2
import
turtle
pen
=
turtle
.
Turtle
()
pen
.
color
(
'sienna'
)
# 画布大小
w
=
turtle
.
Screen
()
w
.
bgcolor
(
'wheat'
)
# wheat小麦
# 移动到起点
pen
.
left
(
90
)
pen
.
up
()
pen
.
backward
(
150
)
# 后退
pen
.
down
()
def
tree
(
n
):
if
n
>=
50
:
pen
.
forward
(
n
)
pen
.
right
(
30
)
tree
(
n
-
90
)
pen
.
left
(
60
)
tree
(
n
-
90
)
pen
.
right
(
30
)
pen
.
penup
()
pen
.
backward
(
n
)
pen
.
pendown
()
tree
(
150
)
'''pen.forward(100)
pen.right(30)
pen.forward(50)
pen.backward(50)
pen.left(60)
pen.forward(50)
pen.left(-20)
pen.up()
pen.backward(150) # 后退
pen.down()'''
turtle
.
done
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment