编写函数test(password, earning, age)用于检测输入错误

匿名 (未验证) 提交于 2019-12-03 00:25:02

test(password, earning, age)passwordearnings0―2000018―70True

def test(password, earning, age):     #assert 1<0     assert password[0] not in ['0','1','2','3','4','5','6','7','8','9']     assert int(earning)>=0 and int(earning)<=20000     assert int(age)>=18 and int(age)<=70     return True 


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