Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-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
4fc43d63
authored
a year ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
1a5993d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
card.py
computy.py
diy1.py
card.py
View file @
4fc43d63
import
turtle
import
turtle
#
pen=turtle.Pen()
pen
=
turtle
.
Pen
()
#
pen.write("hi,妈妈,\n母亲节快乐\n,你辛苦了!",font=("Times",30,"normal"))
pen
.
write
(
"hi,妈妈,
\n
母亲节快乐
\n
,你辛苦了!"
,
font
=
(
"Times"
,
30
,
"normal"
))
#
pen.hideturtle()
pen
.
hideturtle
()
pen1
=
turtle
.
Pen
()
pen1
=
turtle
.
Pen
()
pen1
.
pencolor
(
"red"
)
pen1
.
pencolor
(
"red"
)
pen1
.
pensize
(
10
)
pen1
.
pensize
(
10
)
...
...
This diff is collapsed.
Click to expand it.
computy.py
0 → 100644
View file @
4fc43d63
player
=
input
(
"请出拳(石头/剪刀/布)"
)
print
(
"玩家出拳: "
+
player
)
import
random
list
=
[
"石头"
,
"剪刀"
,
"布"
]
computer
=
random
.
choice
(
list
)
print
(
computer
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
diy1.py
View file @
4fc43d63
...
@@ -5,7 +5,7 @@ screen.bgcolor("light blue")
...
@@ -5,7 +5,7 @@ screen.bgcolor("light blue")
len
=
screen
.
textinput
(
"100"
,
"100"
)
len
=
screen
.
textinput
(
"100"
,
"100"
)
len
=
int
(
len
)
len
=
int
(
len
)
pen
=
turtle
.
Pen
()
pen
=
turtle
.
Pen
()
pen
.
write
(
"你好
\n
SB
."
,
font
=
(
"Times"
,
30
,
"normal"
))
pen
.
write
(
"你好
\n
诺依
."
,
font
=
(
"Times"
,
30
,
"normal"
))
pen
.
hideturtle
()
pen
.
hideturtle
()
len
=
60
len
=
60
pen
.
penup
()
pen
.
penup
()
...
@@ -19,4 +19,4 @@ pen.circle(len,180)
...
@@ -19,4 +19,4 @@ pen.circle(len,180)
pen
.
right
(
90
)
pen
.
right
(
90
)
pen
.
circle
(
len
,
180
)
pen
.
circle
(
len
,
180
)
pen
.
forward
(
2
*
len
)
pen
.
forward
(
2
*
len
)
turtle
.
done
()
turtle
.
done
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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