Commit baa915e1 by BellCodeEditor

save project

parent 93b2e36b
...@@ -12,12 +12,12 @@ def new_input(): ...@@ -12,12 +12,12 @@ def new_input():
else: else:
total.append(int(unit)) total.append(int(unit))
return total return total
a=new_input() #a=new_input()
print(a) #print(a)
def sum(c): def sum(c):
b=0 b=0
for i in c: for i in c:
b=b+i b=b+i
return b return b
zj=sum(a) #zj=sum(a)
print('您一共消费'+str(zj)+'9 元!现金还是微信呢?') #print('您一共消费'+str(zj)+' 元!现金还是微信呢?')
\ No newline at end of file \ No newline at end of file
import func
x=func.new_input()
t=func.sum(x)
print(t)
\ 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