Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-5-2_DIY1
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
18a7406b
authored
Dec 13, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
6b77276d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
148 additions
and
23 deletions
12.py
bug.py
12.py
0 → 100644
View file @
18a7406b
⛅
⛆
⛇
⛈
⛉
⛊
⛋
⛌
⛍
⛎
⛏
⛐
⛑
⛒
⛓
⛔
⛕
⛖
⛗
⛘
⛙
⛚
⛛
⛜
⛝
⛞
⛟
⛠
⛡
⛢
⛣
⛤
⛥
⛦
⛧
⛨
⛩
⛪
⛫
⛬
⛭
⛮
⛯
⛰
⛱
⛲
⛳
⛴
⛵
⛶
⛷
⛸
⛹
⛺
⛻
⛼
⛽
⛾
⛿
✀
✁
✂
✃
✄
✅
✆
✇
✈
✉
✊
✋
✌
✍
✎
✏
bug.py
View file @
18a7406b
import
turtle
a1
=
turtle
.
Pen
()
#用来画桃心
a2
=
turtle
.
Pen
()
#
b
=
turtle
.
Screen
()
b
.
bgcolor
(
"light yellow"
)
c
=
b
.
textinput
(
"提示"
,
"你想要大多的爱心"
)
r
=
int
(
c
)
a1
.
pencolor
(
"purple"
)
a2
.
pencolor
(
"purple"
)
a1
.
hideturtle
()
a1
.
penup
()
a1
.
goto
(
0
,
90
)
a1
.
pendown
()
a1
.
left
(
45
)
a1
.
forward
(
2
*
r
)
a1
.
circle
(
r
,
180
)
a1
.
right
(
90
)
a1
.
circle
(
r
,
180
)
a1
.
forward
(
2
*
r
)
a2
.
penup
()
a2
.
goto
(
-
120
,
0
)
a2
.
write
(
"恭贺新禧"
,
font
=
(
"times"
,
50
,
"normal"
))
turtle
.
done
()
from
turtle
import
*
from
random
import
*
bgcolor
(
"#a1270F"
)
pencolor
(
"red"
)
penup
()
goto
(
-
180
,
-
210
)
pendown
()
write
(
"Merry Christmas"
,
font
=
(
"Arial"
,
39
))
textinput
(
"提示!"
,
"你有一份圣诞礼物请查收!"
)
bgcolor
(
"#F9DDF4"
)
a
=
numinput
(
"提示!"
,
"你想要多大的爱心?"
)
r
=
int
(
a
)
colors
=
[
"blue"
,
"green"
,
"orange"
,
"yellow"
,
"pink"
]
a
=
window_width
()
b
=
window_height
()
pensize
(
2
)
hideturtle
()
penup
()
for
i
in
range
(
40
):
m
=
randint
(
0
,
4
)
pencolor
(
colors
[
m
])
x
=
randint
(
-
a
//
2
,
b
//
2
)
y
=
randint
(
-
b
//
2
,
a
//
2
)
penup
()
goto
(
x
,
y
)
pendown
()
speed
(
0
)
forward
(
2
*
r
)
circle
(
r
,
180
)
right
(
90
)
circle
(
r
,
180
)
forward
(
2
*
r
)
penup
()
goto
(
0
,
0
)
bgcolor
(
"#114552"
)
pencolor
(
"red"
)
fillcolor
(
"red"
)
begin_fill
()
goto
(
-
50
,
-
150
)
goto
(
50
,
-
150
)
goto
(
0
,
0
)
end_fill
()
pencolor
(
"white"
)
fillcolor
(
"white"
)
begin_fill
()
circle
(
10
)
end_fill
()
penup
()
goto
(
-
50
,
-
150
)
pendown
()
pensize
(
20
)
forward
(
100
)
pencolor
(
"white"
)
penup
()
goto
(
-
220
,
70
)
write
(
chr
(
10053
),
font
=
(
"Arial"
,
50
))
penup
()
goto
(
220
,
-
70
)
write
(
chr
(
10053
),
font
=
(
"Arial"
,
50
))
penup
()
goto
(
-
350
,
-
250
)
write
(
chr
(
9924
),
font
=
(
"Arial"
,
100
))
penup
()
pencolor
(
"pink"
)
goto
(
-
220
,
150
)
write
(
"世上本就没有圣诞老人
\n
所有的礼物和惊喜都来自爱你的人"
,
font
=
(
"Arial"
,
18
))
penup
()
goto
(
180
,
-
150
)
pencolor
(
"white"
)
write
(
"皮兴文
\n
工业设计(专升本)
\n
2021年11月28日"
,
font
=
(
"Arial"
,
18
))
done
()
\ No newline at end of file
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