Commit 209d7fab by BellCodeEditor

save project

parent 231ec385
import func
data=func.new_input()
c=func.sum(data)
print('这个选手的总分是'+str(c)+'分')
\ No newline at end of file
import func
data=func.new_input()
c=func.sum(data)
print('这个选手的总分是'+str(c)+'分')
\ No newline at end of file
...@@ -14,13 +14,13 @@ def new_input(): ...@@ -14,13 +14,13 @@ def new_input():
total.append(unit) total.append(unit)
print(30*'*') print(30*'*')
return total return total
a=new_input() # a=new_input()
print(a) # print(a)
def sum(money): def sum(money):
k=0 k=0
for i in money: for i in money:
k+=i k+=i
print(k) print(k)
return k return sum
b=sum(a) # b=sum(a)
print('您一共消费了'+str(b)+'元,扫码还是现金?') # print('您一共消费了'+str(money)+'元,扫码还是现金?')
\ No newline at end of file \ 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