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
d3560129
authored
Apr 23, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
f94a642f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
1 deletions
diy1.py
k.py
yuan.py
东莞.py
diy1.py
View file @
d3560129
import
turtle
import
turtle
# pen=turtle.Pen()
# pen.write("jyu\nyy",font=("MS Gothsic",50,"normal"))
# pen.write("jyu\nyy",font=("MS Gothsic",50,"normal"))
p
=
turtle
.
Pen
()
p
=
turtle
.
Pen
()
p
.
shape
(
"turtle"
)
p
.
color
(
"red"
)
p
.
color
(
"red"
)
p
.
left
(
45
)
p
.
left
(
45
)
p
.
forward
(
100
)
p
.
forward
(
100
)
...
@@ -9,4 +9,55 @@ p.circle(50,180)
...
@@ -9,4 +9,55 @@ p.circle(50,180)
p
.
right
(
90
)
p
.
right
(
90
)
p
.
circle
(
50
,
180
)
p
.
circle
(
50
,
180
)
p
.
forward
(
100
)
p
.
forward
(
100
)
p
.
penup
()
p
.
goto
(
100
,
100
)
p
.
pendown
()
p
.
right
(
45
)
p
.
forward
(
200
)
p
.
right
(
90
)
p
.
forward
(
200
)
p
.
right
(
90
)
p
.
forward
(
200
)
p
.
right
(
90
)
p
.
forward
(
200
)
p
.
right
(
90
)
p
.
home
()
p
.
goto
(
-
100
,
100
)
p
.
home
()
p
.
left
(
90
)
p
.
forward
(
140
)
p
.
home
()
p
.
right
(
45
)
p
.
forward
(
100
)
p
.
right
(
180
)
p
.
circle
(
50
,
-
180
)
p
.
left
(
90
)
p
.
circle
(
50
,
-
180
)
p
.
home
()
p
.
right
(
90
)
p
.
forward
(
140
)
p
.
home
()
p
.
goto
(
-
100
,
-
100
)
p
.
home
()
p
.
goto
(
100
,
-
100
)
p
.
home
()
p
.
left
(
315
)
p
.
forward
(
100
)
p
.
circle
(
50
,
180
)
p
.
right
(
90
)
p
.
circle
(
50
,
180
)
p
.
home
()
p
.
forward
(
140
)
p
.
home
()
p
.
right
(
135
)
p
.
forward
(
100
)
p
.
right
(
180
)
p
.
circle
(
50
,
-
180
)
p
.
left
(
90
)
p
.
circle
(
50
,
-
180
)
p
.
right
(
180
)
p
.
forward
(
100
)
p
.
right
(
135
)
p
.
forward
(
140
)
p
.
home
()
turtle
.
done
()
turtle
.
done
()
k.py
0 → 100644
View file @
d3560129
print
(
"h
\'
h
\'
h"
)
\ No newline at end of file
yuan.py
0 → 100644
View file @
d3560129
def
zhuochang
(
r
):
b
=
3.14
*
r
*
2
c
=
r
*
r
*
3.14
return
b
,
c
a
=
int
(
input
(
"请输入圆的半径:"
))
x
=
zhuochang
(
r
)
print
(
"圆的半径为"
,
r
,
"时,周长是
%.1
f,面积是
%.1
f"
%
x
)
\ No newline at end of file
东莞.py
0 → 100644
View file @
d3560129
a
=
int
(
input
(
"请输入第一条边"
))
a
=
int
(
input
(
"请输入第一条边"
))
b
=
int
(
input
(
"请输入第二条边"
))
c
=
int
(
input
(
"请输入第三条边"
))
z
=
int
((
a
+
b
+
c
)
*
0.5
)
if
a
+
b
>
c
and
a
+
c
>
b
and
c
+
b
>
a
:
x
=
a
+
b
+
c
print
(
"三角形的周长是"
,
x
,
"三角形的面积是"
,
s
)
else
:
print
(
"这三条边不能组成三角形!"
)
\ 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