Commit 725efff3 by BellCodeEditor

save project

parent 044ed2b2
# def new_input():
# total = []
# while True:
# unit= input("请输入(q退出):")
# if unit== 'q':
# break
# else:
# try:
# unit=int(unit)
# except:
# print("数字")
# else:
# total.append(unit)
# return total
# def sum(unit):
# j=0
# for i in unit:
# j=j+i
# return j
# result= new_input()
# pay=sum(result)
# print("你消费了"+str(pay)+"元")
import func
d=func.new_input()
s=func.sum(d)
print("这个人的总分是"+str(s))
\ No newline at end of file
......@@ -20,4 +20,8 @@ def sum(unit):
return j
result= new_input()
pay=sum(result)
print("你消费了"+str(pay)+"元")
\ No newline at end of file
print("你得了"+str(pay)+"分")
# import func
# d=func.new_input()
# s=func.sum(d)
# print("这个人的总分是"+str(s))
\ 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