Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-2
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
07e4dcca
authored
Jun 19, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
085b1b00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
pp.py
sosooso.py
pp.py
0 → 100644
View file @
07e4dcca
#绘制如下图形,相关参数及要求如下:
#(1)画笔起始位置不限,但是整个图形必须要能够在画布中呈现;
#(2)大的正方形由四个小正方形组成;
#(3)每个小正方形的边长均为 100 像素;
#4)左上角和右下角的正方形填充颜色均为黑色;
#(6)绘制完成后,隐藏画笔
import
turtle
p
=
turtle
.
Pen
()
p
.
fillcolor
(
"black"
)
p
.
begin_fill
()
for
i
in
range
(
4
):
p
.
forward
(
100
)
p
.
left
(
90
)
p
.
end_fill
()
p
.
fillcolor
(
"black"
)
p
.
begin_fill
()
p
.
forward
(
100
)
for
i
in
range
(
4
):
p
.
forward
(
100
)
p
.
right
(
90
)
p
.
end_fill
()
p
.
right
(
90
)
for
i
in
range
(
4
):
p
.
forward
(
100
)
p
.
right
(
90
)
p
.
right
(
180
)
for
i
in
range
(
4
):
p
.
forward
(
100
)
p
.
right
(
90
)
turtle
.
done
()
\ No newline at end of file
sosooso.py
0 → 100644
View file @
07e4dcca
print
(
3.1415926
*
6
**
2
)
p
=
float
(
3.1415926
)
r
=
6
s
=
p
*
r
**
2
print
(
"
%0.3
f"
%
s
)
\ 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