age = 26 count = 0 while count < 4: intput = int(input("请猜猜我的年龄:")) if intput < age: print ("输入过小,请重新输入") elif intput > age: print ("输入过大,请重新输入") elif intput == age: print ("答案正确,游戏退出") break count = count + 1 print count else: print ("输入错误超过3次,游戏退出")
Copyright © 2019- azee.cn 版权所有 赣ICP备2024042794号-5
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务