Commit 4eabab36 by BellCodeEditor

save project

parent bfae98ef
Showing with 6 additions and 5 deletions
def inprt_nuit(): def input_unit():
total = [] total = []
while true: while True:
unit= inprt("请输入: ") unit= input("请输入: ")
if nuit=='q': if unit=='q':
break break
try: try:
unit = int(unit) unit = int(unit)
except: except:
print("请输入数字") print("请输入数字")
else: else:
total.append(unit) total.append(nuit)
print(total) print(total)
input_unit() input_unit()
\ 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