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
5fc4e86a
authored
Jun 18, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
e728c6a5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
16 deletions
123.py
88.py
__pycache__/func.cpython-37.pyc
cjjj.py/k5
func.py
123.py
View file @
5fc4e86a
...
@@ -20,8 +20,8 @@ def sum(ji):
...
@@ -20,8 +20,8 @@ def sum(ji):
count
=
count
+
i
count
=
count
+
i
return
count
return
count
#
result=new_input()
result
=
new_input
()
#
print(result[0])
print
(
result
[
0
])
price
=
new_input
()
price
=
new_input
()
pay
=
sum
(
price
)
pay
=
sum
(
price
)
print
(
"你一共消费了"
+
str
(
pay
)
+
"现金还是扫码"
)
print
(
"你一共消费了"
+
str
(
pay
)
+
"现金还是扫码"
)
...
...
88.py
View file @
5fc4e86a
def
sum
(
money
):
import
func
count
=
0
for
i
in
money
:
data
=
func
.
new_input
()
count
=
count
+
1
score
=
func
.
sum
(
data
)
return
count
print
(
"这位选手的分数为"
+
str
(
score
))
\ No newline at end of file
__pycache__/func.cpython-37.pyc
0 → 100644
View file @
5fc4e86a
File added
cjjj.py/k5
0 → 100644
View file @
5fc4e86a
import func
x=func.new_input()
\ No newline at end of file
func.py
View file @
5fc4e86a
total
=
[]
def
new_input
():
while
True
:
total
=
[]
unit
=
input
(
"请输入:"
)
while
True
:
if
unit
==
'q'
:
unit
=
input
(
"请输入:"
)
break
if
unit
==
'q'
:
else
:
break
total
.
append
(
unit
)
else
:
print
(
total
)
try
:
\ No newline at end of file
unit
=
int
(
unit
)
except
:
print
(
"请输入一个数字"
)
else
:
total
.
append
(
unit
)
finally
:
print
(
"_"
*
30
)
return
total
def
sum
(
ji
):
count
=
0
for
i
in
ji
:
count
=
count
+
i
return
count
result
=
new_input
()
# print(result[0])
price
=
new_input
()
pay
=
sum
(
price
)
# 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