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
f1b7e7ac
authored
Dec 24, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
641d8dc6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
27 deletions
1.py
8.py
__pycache__/func.cpython-37.pyc
func.py
1.py
View file @
f1b7e7ac
import
turtle
import
func
turtle
.
speed
(
0
)
turtle
.
forward
(
100
)
# 调用自定义的输入函数,实现分数输入的功能
turtle
.
right
(
90
)
data
=
func
.
new_input
()
turtle
.
forward
(
100
)
# 调用自定义的求和函数,计算需要支付的总价
turtle
.
done
()
score
=
func
.
sum
(
data
)
print
(
"这位选手的总分数为:"
+
str
(
score
))
\ No newline at end of file
8.py
View file @
f1b7e7ac
import
turtle
turtle
.
penup
()
turtle
.
goto
(
0
,
-
50
)
turtle
.
pendown
()
turtle
.
circle
(
50
)
turtle
.
penup
()
turtle
.
goto
(
-
50
,
0
)
turtle
.
down
()
turtle
.
forward
(
100
)
turtle
.
penup
()
turtle
.
goto
(
0
,
50
)
turtle
.
right
(
90
)
turtle
.
down
()
turtle
.
forward
(
100
)
turtle
.
hideturtle
()
turtle
.
done
()
\ No newline at end of file
__pycache__/func.cpython-37.pyc
View file @
f1b7e7ac
No preview for this file type
func.py
View file @
f1b7e7ac
...
@@ -18,6 +18,6 @@ def sum(money):
...
@@ -18,6 +18,6 @@ def sum(money):
for
i
in
money
:
for
i
in
money
:
count
=
count
+
i
count
=
count
+
i
return
count
return
count
#
price=new_input()
price
=
new_input
()
#
pay=sum(price)
pay
=
sum
(
price
)
#
print('您一共消费了'+ str(pay) +'元')
print
(
'您一共消费了'
+
str
(
pay
)
+
'元'
)
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