Commit 97c8110a by BellCodeEditor

auto save

parent 024fb164
Showing with 25 additions and 9 deletions
import time
a=time.time()
print(a)
print("小明今年%s岁了,身高%.1fcm,体重%skg"%(18,171.78,50))
time.sleep(10)
b=time.time()
print(b)
print(b-a)
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
total.append(unit)
print(total)
\ No newline at end of file
def aa():
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
try:
k=int(unit)
except:
print("输入不正确,请重新输入!")
else:
total.append(k)
return total
p=aa()
print(p)
\ 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