Commit 2ac506af by BellCodeEditor

save project

parent 05e7d622
import func
new_input = func.new_input
total = []
def new_input():
for i in range(5):
unit= input("请输入:")
# if unit== 'q':
# break
#else:
try:
int(unit)
except:
print('请输入数字!')
else:
total.append(unit)
print('加入成功')
return total
n = new_input()
a = 0
for i in total:
a = a+int(i)
print('您总分为'+str(a)+'分')
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