Commit be018cdb by BellCodeEditor

auto save

parent dc70412a
Showing with 26 additions and 0 deletions
def price():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
total.append(int(unit))
except:
print("输入数字哦")
else:
print("继续输入")
print(total)
d=price()
print(d)
\ No newline at end of file
try:
age=int(input("输入年龄"))
except:
print("请输入数字哦")
else:
if age>18:
print("恭喜已经成年")
print("结束")
\ 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