摘要:
初识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 阅读全文
摘要:
If…else的进阶,用几个程序来实现讲解。 用if猜数字: #!/usr/bin/env python# -*- coding:utf-8 -*-#Author:Mclindage = 56guess_age = int(input("guess age:"))if guess_age == ag 阅读全文
摘要:
密码校验(简单if判断): #!/usr/bin/env python# -*- coding:utf-8 -*-#Author:Mclind_username = "mc"_password="123"username = input("username:")password = input("p 阅读全文
摘要:
用户交互输入: #!/usr/bin/env python # -*- coding:utf-8 -*- #Author:Mclind username = input("username:") password = input("password:") print (username,passwo 阅读全文
摘要:
python变量: #!/usr/bin/env python # -*- coding:utf-8 -*- #Author:Mclind name = "mclind" name2 = name print ("My name is ", name, name2) name = "Jack Che 阅读全文
摘要:
第一个python程序:HelloWorld.py 运行环境:win10、python3.5.X #!/usr/bin/env python # -*- coding:utf-8 -*- #Author:Mclind print ("hello, world!") 输出: hello, world! 阅读全文