Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_1
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
aede98bf
authored
Jul 04, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
70475513
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
30 deletions
func.py
func.py
View file @
aede98bf
#
k = input("请输入正方形的边长。")
k
=
input
(
"请输入正方形的边长。"
)
#
k = int(k)
k
=
int
(
k
)
#
while True:
while
True
:
#
if k = 0 or k<0:
if
k
=
0
or
k
<
0
:
#
print("数字要大于0呦。")
print
(
"数字要大于0呦。"
)
#
else:
else
:
#
print("输入成功")
print
(
"输入成功"
)
#
break
break
#
q=k*4
q
=
k
*
4
#
w=k*k
w
=
k
*
k
#
print("周长是:"q)
print
(
"周长是:"
q
)
#
print("面积是:"w)
print
(
"面积是:"
w
)
#
5
5
#
bianliang="Hallo world"
bianliang
=
"Hallo world"
#
dizhi=id(bianliang)
dizhi
=
id
(
bianliang
)
#
print(dizhi)
print
(
dizhi
)
#
d=5
d
=
5
#
import turtle
import
turtle
#
iwd=turtle.Pen
iwd
=
turtle
.
Pen
#
iwd.pencolour("pink")
iwd
.
pencolour
(
"pink"
)
#
iwd.left(105)
iwd
.
left
(
105
)
#
for i in range(d):
for
i
in
range
(
d
):
#
iwd.circle(75,90)
iwd
.
circle
(
75
,
90
)
#
iwd.left(90)
iwd
.
left
(
90
)
#
iwd.circle(75,90)
iwd
.
circle
(
75
,
90
)
#
iwd.left(60)
iwd
.
left
(
60
)
#
iwd.down()
iwd
.
down
()
#
iwd.hideturtle()
iwd
.
hideturtle
()
...
...
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