📌  相关文章
📜  age="0" while age==0: age_str=input("你的年龄") try: age=int(age_str) except: print("Error..age must be number") print("你的年龄是"+age_str) - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:52.894000             🧑  作者: Mango

代码示例1
age="0"


while age==0:
    age_str=input("what is your age")
    try:
        age=int(age_str)
    except:
      print("Error..age must be number")

print("Your age is "+age_str)