Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_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
4dba8b9d
authored
Nov 05, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
9ade0ff7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
25 deletions
1.py
aaa.py
func.py
1.py
View file @
4dba8b9d
import
turtle
import
turtle
Pen
=
turtle
.
Pen
()
Pen
=
turtle
.
Pen
()
Pen
.
write
(
"你好呀!
\n
,我在玛酷学编程
\n
,快来一起来学习吧!
\n
,"
,
font
=
(
"Times"
,
30
,
"normal"
))
Pen
.
write
(
"你好呀!
\n
我在玛酷学编程,
\n
快来一起来学习吧!
\n
"
,
font
=
(
"Times"
,
30
,
"normal"
))
Pen
.
hideturtle
()
Pen1
=
turtle
.
Pen
()
screen
=
turtle
.
Screen
()
len
=
screen
.
textinput
(
"xx"
,
"大小"
)
Pen1
.
penup
()
Pen1
.
goto
(
-
150
,
0
)
lovly
=
int
(
len
)
Pen1
.
pensize
(
5
)
Pen1
.
pencolor
(
"red"
)
Pen1
.
left
(
45
)
Pen1
.
pendown
()
Pen1
.
forward
(
2
*
lovly
)
Pen1
.
circle
(
lovly
,
180
)
Pen1
.
right
(
90
)
Pen1
.
circle
(
lovly
,
180
)
Pen1
.
forward
(
2
*
lovly
)
Pen1
.
hideturtle
()
turtle
.
done
()
turtle
.
done
()
\ No newline at end of file
aaa.py
0 → 100644
View file @
4dba8b9d
import
turtle
screen
=
turtle
.
Screen
()
screen
.
textinput
(
"姓名框"
,
"名字:"
)
turtle
.
done
()
\ No newline at end of file
func.py
View file @
4dba8b9d
def
e
():
total
=
[]
while
True
:
unit
=
input
(
"请输入这位选手的分数:"
)
if
unit
==
'q'
:
break
else
:
try
:
unit
=
int
(
unit
)
except
:
print
(
"请重新输入分数:"
)
else
:
total
.
append
(
unit
)
print
(
"-"
*
30
)
return
total
result
=
e
()
print
(
result
)
sum
=
0
a
=
0
for
i
in
range
(
len
(
result
)):
sum
=
sum
+
result
[
i
]
print
(
"这位选手的分数是"
+
str
(
sum
))
\ 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