标签:class nbsp inpu 题目 ... 奇数 int 练习 col
i = 1 while i <=10 : if i != 7: print(i) else: print(‘ ‘) i += 1
i = 1 sum = 0 while i <= 100: sum += i i += 1 print(sum)
i = 1 while i <= 100: print(i) i += 2
i = 2 while i <= 100: print(i) i += 2
i = 1 sum = 0 while i < 100: if i%2 == 1: sum += i else: sum -= i i += 1 print(sum)
i = 1 while i <= 3: name = input(‘请输入用户名:‘) password = input(‘请输入密码:‘) if name == ‘悟空‘ and password == ‘123‘: print(‘登陆成功‘) break else: print(‘登陆失败‘) i += 1
标签:class nbsp inpu 题目 ... 奇数 int 练习 col
原文地址:http://www.cnblogs.com/Coufusion/p/7694703.html