标签:python基础
age = 30 c = 0 #定义记数器 for i in range(10): if c < 3: guess = int(input("Plseae guess my age:")) if guess == age: print("Yes,your are right") break elif guess < age: print("It is too little") else: print("Tt is too big") else: continue_confirm = input("continue press ‘yes‘,exit press ‘no‘:") if continue_confirm == ‘yes‘: c = 0 elif continue_confirm == ‘no‘: print("see you") break else: print("Wrong words") c += 1
本文出自 “IT技术” 博客,请务必保留此出处http://jacky421.blog.51cto.com/916208/1936800
标签:python基础
原文地址:http://jacky421.blog.51cto.com/916208/1936800