i =0while i <3:
i +=1
name =input('名字')if name =='lxw':print('成功')break
i =0while i <10:
i +=1print(i)
i =0
u =0while i <=100:if i %2==0:
u += i
else:
u -= i
i +=1print(u)
i =0while i <=100:
i +=1if i %2==0:print(i)
i =0while i <3:
i +=1
name =input('输入名字')if name =='lxw':print('成功')break
格式化输出:如果需要%,则需要转译,就是%%
name ='ll'
age ='18'print('名字%s 年龄%s'%(name, age))