Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-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
63cf08d6
authored
Mar 19, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
a739410b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
16 deletions
diy.py
func.py
ws.py
diy.py
deleted
100644 → 0
View file @
a739410b
def
new_aa
():
jiage
=
[]
while
True
:
wenti
=
input
(
"请输入价格,(按q退出)"
)
if
wenti
==
"q"
:
break
try
:
a
=
int
(
wenti
)
except
:
print
(
"请重新输入一个数字"
)
else
jiage
.
append
(
a
)
finally
:
print
(
"_"
*
30
)
print
(
jiage
)
new_aa
()
func.py
0 → 100644
View file @
63cf08d6
def
b
():
a
=
[]
while
True
:
c
=
input
(
'请输入价格("按q退出")'
)
if
c
==
"q"
:
break
else
:
try
:
h
=
int
(
c
)
except
:
print
(
"请重新输入一个数字"
)
else
:
a
.
append
(
h
)
finally
:
print
(
"="
*
30
)
return
a
def
r
(
t
):
u
=
0
for
i
in
t
:
u
=
u
+
i
return
u
j
=
b
()
k
=
r
(
j
)
#print("你一共消费了"+str(k)+"元")
ws.py
0 → 100644
View file @
63cf08d6
import
func
data
=
n
\ 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