Commit 97119428 by BellCodeEditor

save project

parent b318d51b
import func
data =func.new_input()
score=func.sun_price(data)
print("这位选手总分",score)
...@@ -12,13 +12,10 @@ def new_input(): ...@@ -12,13 +12,10 @@ def new_input():
else: else:
total.append(n) total.append(n)
return total return total
total=new_input()
print(total)
def sun_price(price_list): def sun_price(price_list):
sums=0 sums=0
for i in price_list: for i in price_list:
sums=sums+i sums=sums+i
return sums return sums
cost=sum_price(total)
prin("总的价格为",cost)
\ 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