Commit 6abef124 by BellCodeEditor

save project

parent 5f0f580b
...@@ -11,12 +11,12 @@ def new_input(): ...@@ -11,12 +11,12 @@ def new_input():
print("请输入整数") print("请输入整数")
else: else:
total.append(s) total.append(s)
print(total) # print(total)
return total return total
# new_input() # new_input()
def sum(yuan): def sum(yuan):
f=0 f=0
for i in yuan: for i in yuan:
f=f+i f=f+i
print("您一共消费"+int(f)+"元!扫码还是现金呢?") print("您一共消费"+str(f)+"元!扫码还是现金呢?")
return f return f
\ No newline at end of file
import func
data1= func.new_input()
qwe=func.sum(data1)
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