Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson1_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
93c8e3a7
authored
Dec 16, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
53ca9cec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
0 deletions
1.py
2.py
3.py
1.py
0 → 100644
View file @
93c8e3a7
import
turtle
as
t
t
.
penup
()
t
.
goto
(
80
,
-
130
)
t
.
pendown
()
for
i
in
range
(
4
):
t
.
left
(
90
)
t
.
forward
(
400
)
t
.
setheading
(
-
360
)
t
.
penup
()
t
.
goto
(
-
120
,
-
30
)
t
.
pendown
()
t
.
fillcolor
(
"blue"
)
t
.
begin_fill
()
t
.
circle
(
100
,
360
)
t
.
end_fill
()
t
.
done
()
\ No newline at end of file
2.py
0 → 100644
View file @
93c8e3a7
import
turtle
as
t
t
.
penup
()
t
.
goto
(
-
50
,
-
150
)
t
.
pendown
()
t
.
circle
(
200
,
360
)
t
.
fillcolor
(
"yellow"
)
t
.
begin_fill
()
t
.
circle
(
200
,
360
)
t
.
end_fill
()
t
.
penup
()
t
.
goto
(
30
,
-
20
)
t
.
pendown
()
for
i
in
range
(
4
):
t
.
left
(
90
)
t
.
forward
(
150
)
t
.
fillcolor
(
"white"
)
t
.
begin_fill
()
for
i
in
range
(
4
):
t
.
left
(
90
)
t
.
forward
(
150
)
t
.
end_fill
()
t
.
done
()
\ No newline at end of file
3.py
0 → 100644
View file @
93c8e3a7
#print("周子杰")
#print("zack")
#print("10")
#="hello"*2
#input(s)
####q=19
#w=9
#input(19**9)#次方运算
#a=9909999999999
#d=101010101010
#input(9909999999999*101010101010)#乘法
#a=278
#w=93
#input(278//93)
#p = float(3.1415926)
#r = 6
#area = p*r*r
#print("圆的面积为:%0.2f"%area) #计算圆的面积
#import turtle as t #导入海龟库
#t.screensize(800,600,"pink")#画布大小
#t.setup(600,600,300,200)#窗口位置
#t.done()
#t.circle()
#编写一个程序,它以圆的半径作为输入,输出圆的直径、
#周长和面积(保留两位小数)。 要求: 程序开始运行
#后,输入一个数字作为半径; 程序会根据输入的数字给出
#圆的直径、 周长和面积,并且注明是直径、周长、面积。
p
=
3.14
r
=
float
(
input
(
"请输入一个大于0的半径:"
))
a
=
2
*
r
#直径
b
=
a
*
r
#周长
c
=
p
*
r
*
r
#面积
print
(
"圆的直径是
%.2
f"
%
a
)
print
(
"圆的周长是
%.2
f"
%
b
)
print
(
"圆的面积是
%.2
f"
%
c
)
\ 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