Commit dc6ca468 by BellCodeEditor

save project

parent dc70412a
def nee():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
int(unit)
except:
print('暂不支持输入汉字!')
else:
total.append(unit)
finally:
print('-'*30)
return total
def ew(qianzonghe):
cot=0
for i in qianzonghe:
cot+=i
return cot
a=nee()
pay=ew(a)
print('你一共消费了'+pay+'元!')
try:
try:
age=int(input('你今年几岁了?'))
except:
print('请输入数字!!!!!!!!!!!!!!!!!!!!!!')
else:
if age>18:
print('恭喜你,成年了!')
print('程序结束!')
\ No newline at end of file
++ "b/\351\200\237\345\272\246\346\224\276\347\274\223\345\215\242\350\220\250\345\215\241\350\247\211\345\276\227\345\245\275\345\220\203\357\274\233uayhuayh.ty/a.py/b.py"
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