2018年3月24日

04 break&continue

摘要: for i in range(0,10): if i < 3: print(i) else: continue print("hehe") continue是跳出本次循环,break是结束整个循环 for i in range(10): print(" ",i) for j in range(10) 阅读全文

posted @ 2018-03-24 18:30 已然 阅读(123) 评论(0) 推荐(0)

03.if while for

摘要: 1.if...else if... _username='kelly' _password='abc123' username = input("username:") password = input("password:") if _username == username and _passw 阅读全文

posted @ 2018-03-24 18:29 已然 阅读(109) 评论(0) 推荐(0)

02.input()交互

摘要: 1.input()使用 # -*- coding:utf-8 -*- username=input("username:") password=input("password:") print(username,password) # -*- coding:utf-8 -*- username=in 阅读全文

posted @ 2018-03-24 18:21 已然 阅读(155) 评论(0) 推荐(0)

01.变量和字符编码

摘要: (1)变量定义的规则: 变量名只能是 字母、数字或下划线的任意组合 变量名的第一个字符不能是数字 以下关键字不能声明为变量名 ['and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'ex 阅读全文

posted @ 2018-03-24 18:15 已然 阅读(216) 评论(0) 推荐(0)

导航