摘要: # i = 3# username = "yangxiaoer"# password = "123456"# while i>=0:# name = input("请输入你的用户名:")# if name == username:# passwd = input("请输入你的密码:")# if pa 阅读全文
posted @ 2018-10-20 14:22 梦潇幻影 阅读(1118) 评论(0) 推荐(0)
摘要: 1 i = 0 2 while i < 3: 3 username = input('请输入账号:') 4 password = int(input('请输入密码:')) 5 if username == '咸鱼哥' and password == 123: 6 print('登录成功') 7 else: 8 print('登录失败... 阅读全文
posted @ 2018-10-16 00:12 梦潇幻影 阅读(250) 评论(0) 推荐(0)
摘要: 1 sum = 0 2 count = 1 3 while count < 100: 4 if count % 2 == 0: 5 sum = sum - count 6 else: 7 sum = sum + count 8 count += 1 9 print(sum) 阅读全文
posted @ 2018-10-16 00:11 梦潇幻影 阅读(268) 评论(0) 推荐(0)
摘要: 1 方法一: 2 count = 1 3 while count < 101: 4 print(count) 5 count += 2 6 方法二: 7 count = 1 8 while count < 101: 9 if count % 2 == 1: 10 print(count) 11 count += ... 阅读全文
posted @ 2018-10-16 00:06 梦潇幻影 阅读(229) 评论(0) 推荐(0)
摘要: 1 count = 0 2 while count < 10: 3 count += 1 # count = count + 1 4 if count == 7: 5 print(' ') 6 else: 7 print(count) 8 9 count = 0 10 while count < 10: 11 ... 阅读全文
posted @ 2018-10-16 00:01 梦潇幻影 阅读(1022) 评论(0) 推荐(0)