Commit 6eb079c1 by BellCodeEditor

save project

parent b3aed780
Showing with 16 additions and 10 deletions
unit=0 unit=0
i=0 i=0
total = []
XYZ=0
def A(): def A():
total = []
while True: while True:
unit=input("请输入:") unit=input("请输入:")
if unit=='q': if unit=='q':
...@@ -18,11 +19,7 @@ def you_can(money): ...@@ -18,11 +19,7 @@ def you_can(money):
wq=0 wq=0
for i in money: for i in money:
wq=wq+i wq=wq+i
return wq XY=wq/len(money)
print("請輸入價格,按‘q’退出") return wq,XY
x=A()
y=you_can(x)
z=str(y)
print("您的花費為:")
print(z+"元")
print("祝您用餐愉快!")
\ No newline at end of file
import func
x=func.A()
y,s=func.you_can(x)
print("这位选手的总成绩为:"+str(y),"这位选手的平均分为:"+str(s))
#z=str(y)
#print("这位选手的总成绩为:")
#print(z+"分!")
#print("这位选手的平均分为:")
#print(str(func.XYZ)+"分!")
\ 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