Commit 1991f25a by BellCodeEditor

save project

parent d15a151f
...@@ -21,7 +21,7 @@ def sum(money): ...@@ -21,7 +21,7 @@ def sum(money):
count = count + i count = count + i
return count return count
price = new_input() # price = new_input()
pay = sum(price) # pay = sum(price)
print("您一共消费了"+str(pay)+"元!扫码还是现金呢?") # print("您一共消费了"+str(pay)+"元!扫码还是现金呢?")
import func
# 调用自定义的输入函数,实现分数输入的功能
data = func.new_input()
# 调用自定义的求和函数,计算需要支付的总价
score = func.sum(data)
print("这位选手的总分数为:"+str(score))
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