廖雪峰网站―学习python基础知识(三)

匿名 (未验证) 提交于 2019-12-02 22:56:40

age = 18 if age >= 18:     print(your are is, age)     print(adult)   age = 3  if age >= 18:     print(your are is, age)     print(adult)  elif age >= 6:     print(your are is, age)     print(Sarah)  elif age >= 3:     print(your are is, age)     print(Jack)  else:     print(your are is, age)     print(mike)   # 注意: # input()返回的是字符串 # 必须通过int()将字符串转换为整数 # 才能用于数值比较: age = int(input(Input your age:)) if age >= 18:     print(your are is, age)     print(adult)  elif age >= 6:     print(your are is, age)     print(Sarah)  elif age >= 5:     print(your are is, age)     print(Jack)  else:     print(your are is, age)     print(mike)

 

原文:https://www.cnblogs.com/qy1234/p/9352950.html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!