python chapter2 列表的使用 3.1

#-*- coding: utf-8 -*- # Author : Paulliam Yu names = ["0-li","1-yu","2-zhang","3-wa...

2018-03-06 11:50:36

阅读数:17

评论数:0

python chapter2 数据类型及模块 2 编写调用自己做的模块

####一下源码所在的模块是 passwd.py #########passwd.py source code Begin# -*- coding:utf-8 -*- # -Author: Paulliam - # if else 判断;密码明文/暗文输入 import getpass _us...

2018-02-26 22:23:24

阅读数:16

评论数:0

python chapter2 数据类型及模块 1 os模块

# -*- coding:utf-8 -*- # -Author: Paulliam - import os cmd_result = os.system("dir") #执行命令后,并不能保存结果 print("the value i...

2018-02-26 22:06:32

阅读数:103

评论数:0

python chapter2 数据类型及模块 0 sys

# -*- coding:utf-8 -*- # -Author: Paulliam - _author = "yu" import sys #print(sys.path) #打印环境变量 print(sys.argv) #打印所有参数 print(...

2018-02-26 21:25:52

阅读数:18

评论数:0

python语法 5 应用guess 之 for - else

# -*- coding:utf-8 -*- # -Author: Paulliam - # if else 判断; age_of_yu = 56 for i in range(3): #i的值只能由0到2 print("value of i: &quot...

2018-02-25 14:45:43

阅读数:63

评论数:0

python语法 5 应用guess 之 while else

# -*- coding:utf-8 -*- # -Author: Paulliam - # if else 判断; age_of_yu = 56 guess_count = 0 while guess_count<3: guess_age = int(input...

2018-02-25 14:38:32

阅读数:72

评论数:0

python语法 5 应用guess 之 while True 、break

# -*- coding:utf-8 -*- # -Author: Paulliam - # if else 判断; age_of_yu = 56 guess_count = 0 while True: if guess_count == 3: break gu...

2018-02-25 14:33:49

阅读数:24

评论数:0

python语法 4 continue

# -*- coding:utf-8 -*- # -Author: Paulliam - for i in range(10): if i<5: print("loop",i) else: ...

2018-02-25 14:28:37

阅读数:15

评论数:0

python语法 3.1 双重for循环

# -*- coding:utf-8 -*- # -Author: Paulliam - for i in range(5): print("---------",i) for j in range(10): print(j)...

2018-02-25 14:25:02

阅读数:274

评论数:0

python语法 3 for循环 (for i in range (0,10,3): #只打印0到9这10个数中能被3整除的数)

# -*- coding:utf-8 -*- # -Author: Paulliam - for i in range (10): print("loop",i) print("------------------------&a...

2018-02-25 14:22:59

阅读数:436

评论数:0

python语法 2 while循环

# -*- coding:utf-8 -*- # -Author: Paulliam - count = 0 while True: #print("the value of count is {_count}".format(__count=cou...

2018-02-25 14:19:39

阅读数:41

评论数:0

python语法 2 if else 判断;密码明文/暗文输入

# -*- coding:utf-8 -*- # -Author: Paulliam - # if else 判断;密码明文/暗文输入 import getpass _username ="yu" _passwd ="yu123&q...

2018-02-25 14:16:35

阅读数:67

评论数:0

python语法 1.1 格式化输入 默认输入的字符数据类型转换为整型

# -*- coding:utf-8 -*- # -Author: Paulliam - #用户交互 #解释器2.0版本编译有误 name = input("name:") age = int(input("age:"))...

2018-02-25 14:08:24

阅读数:73

评论数:0

python语法 1.0 格式化输入

# -*- coding:utf-8 -*- # -Author: Paulliam - #用户交互 #解释器2.0版本编译有误 name = input("name:") age = input("age:") prin...

2018-02-25 14:04:49

阅读数:49

评论数:0

python语法 0 注释多行

# -*- coding:utf-8 -*- # -Author: Paulliam - # 注释多行,被注释的内容可以被变成一个字符串,然后赋值给一个变量 msg =''' #don't chang line name = "Paulliam Yu" nam...

2018-02-25 13:56:27

阅读数:20

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭