摘要: 初识for循环: #!/usr/bin/env python# -*- coding:utf-8 -*-#Author:Mclindfor i in range(10): print ("loop", i) 输出: loop 0 loop 1 loop 2 loop 3 loop 4 loop 5 阅读全文
posted @ 2018-03-28 20:40 mclind 阅读(125) 评论(0) 推荐(0) 编辑
摘要: If…else的进阶,用几个程序来实现讲解。 用if猜数字: #!/usr/bin/env python# -*- coding:utf-8 -*-#Author:Mclindage = 56guess_age = int(input("guess age:"))if guess_age == ag 阅读全文
posted @ 2018-03-27 14:00 mclind 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 密码校验(简单if判断): #!/usr/bin/env python# -*- coding:utf-8 -*-#Author:Mclind_username = "mc"_password="123"username = input("username:")password = input("p 阅读全文
posted @ 2018-03-26 06:29 mclind 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 用户交互输入: #!/usr/bin/env python # -*- coding:utf-8 -*- #Author:Mclind username = input("username:") password = input("password:") print (username,passwo 阅读全文
posted @ 2018-03-19 19:47 mclind 阅读(225) 评论(0) 推荐(0) 编辑
摘要: python变量: #!/usr/bin/env python # -*- coding:utf-8 -*- #Author:Mclind name = "mclind" name2 = name print ("My name is ", name, name2) name = "Jack Che 阅读全文
posted @ 2018-03-18 19:55 mclind 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 第一个python程序:HelloWorld.py 运行环境:win10、python3.5.X #!/usr/bin/env python # -*- coding:utf-8 -*- #Author:Mclind print ("hello, world!") 输出: hello, world! 阅读全文
posted @ 2018-03-17 20:21 mclind 阅读(110) 评论(1) 推荐(0) 编辑