Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_5
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
5eb2e2c7
authored
Sep 23, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
3fd61942
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
25 deletions
__pycache__/func.cpython-37.pyc
a.py
func.py
__pycache__/func.cpython-37.pyc
View file @
5eb2e2c7
No preview for this file type
a.py
View file @
5eb2e2c7
import
func
ss
=
func
.
sum
()
\ No newline at end of file
bb
=
func
.
ll
()
print
(
"这位选手的总分数为:"
+
str
(
bb
)
+
"分"
)
func.py
View file @
5eb2e2c7
def
num
():
a
=
[]
while
True
:
try
:
b
=
input
(
"请输入:"
)
if
b
==
'q'
:
break
b
=
int
(
b
)
except
:
print
(
"请输入整数,程序错误"
)
else
:
a
.
append
(
b
)
return
a
c
=
num
()
print
(
c
)
def
sum
(
money
):
count
=
0
for
i
in
money
:
count
=
count
+
i
return
count
count1
=
sum
(
c
)
# print("你一共消费了",count1,"元!扫描还是现金呢?")
\ No newline at end of file
def
ll
():
def
num
():
a
=
[]
while
True
:
try
:
b
=
input
(
"请输入:"
)
if
b
==
'q'
:
break
b
=
int
(
b
)
except
:
print
(
"请输入整数,程序错误"
)
else
:
a
.
append
(
b
)
return
a
c
=
num
()
print
(
c
)
def
sum
(
money
):
count
=
0
for
i
in
money
:
count
=
count
+
i
return
count
count1
=
sum
(
c
)
return
count1
# print("你一共消费了",count1,"元!扫描还是现金呢?")
\ 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