Commit b5b069c3 by BellCodeEditor

save project

parent e3f187f6
Showing with 15 additions and 4 deletions
...@@ -3,10 +3,17 @@ while True: ...@@ -3,10 +3,17 @@ while True:
unit=input('请输入单价(q退出)') unit=input('请输入单价(q退出)')
if unit='p' if unit='p'
break break
else: else:
try:
unit=int(unit)
except:
print("请重新输入")
else :
total.append(unit)
finally:
print("-"*30)
print(total)
return unit
def sum (money): def sum (money):
count=() count=()
......
import func
data=funt.new_input()
score=funt.sum(data)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment