AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
1、while() ``` age = raw_input("please give me your age in years (eg.30):") while not age.isdigit(): print "I'm sorry,but {} isn't valid.".format(age) age = raw_input("please give me your age in years (eg.30):") print "thanks! your age is set to {} ".format(age) ``` 2、无限循环![] ``` while True: text = raw_input("give me some text,and I'll count the e's.Enter 'q' to quit: ") if text == 'q': break print text.count('e') ```