2019年4月15日

pygame安装及测试

摘要: pip install pygame python -m pygame.examples.aliens 阅读全文

posted @ 2019-04-15 16:16 winecork 阅读(292) 评论(0) 推荐(0) 编辑

2019年4月9日

WordCloud

摘要: 文本1.txt + 图9.jpg 9.jpg 1.jpg 阅读全文

posted @ 2019-04-09 10:59 winecork 阅读(123) 评论(0) 推荐(0) 编辑

2019年4月4日

python写入xls

摘要: 安装xlwt windows,cmd,pip install xlwt 读取linux下的cat /proc/cpuinfo>cpuinfo 代码: 文件cpuinfo 阅读全文

posted @ 2019-04-04 13:56 winecork 阅读(120) 评论(0) 推荐(0) 编辑

2019年2月26日

修改win主机远程桌面端口

摘要: 开始-运行-“regedit”[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp][HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Con 阅读全文

posted @ 2019-02-26 15:45 winecork 阅读(132) 评论(0) 推荐(0) 编辑

2019年2月21日

使用pip安装matplotlib

摘要: 失败: >python -m pip install --user matplotlib.whl #本地安装失败 >pip install matplotlib #超时 成功: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some- 阅读全文

posted @ 2019-02-21 16:20 winecork 阅读(416) 评论(0) 推荐(0) 编辑

2019年1月14日

函数

摘要: 定义做衣服函数,传参数大小和印在Tee上的字 return python将非空字符串解读为True 结合while 任意数量参数 导入整个模块 文件pizza.py内容 文件making_pizza.py内容 输出结果: 导入特定函数:from module_name import function 阅读全文

posted @ 2019-01-14 20:53 winecork 阅读(165) 评论(0) 推荐(0) 编辑

2019年1月11日

用户输入和while循环

摘要: input() 求模运算符:%,它将两个数相除并返回余数 余数如果是0,可利用这点来判断奇/偶数 while循环:不断地运行,知道指定的条件不满足为止。 标记 break continue 注:如果命令行出现无限循环,Ctrl+C退出 验证新注册用户,将未验证用户移动到已验证用户列表中 删除列表中所 阅读全文

posted @ 2019-01-11 23:19 winecork 阅读(139) 评论(0) 推荐(0) 编辑

字典

摘要: 建立空字典 删除键值对 遍历键值对 遍历字典中的所有键 遍历字典中的所有值 嵌套: 字典中嵌套列表:打印每人最爱的语言 字典中嵌套字典: 阅读全文

posted @ 2019-01-11 18:19 winecork 阅读(126) 评论(0) 推荐(0) 编辑

if语句

摘要: 比较: ==、!=、<、<=、>、>= in、not in and、or if语句: if if-else if-elif-else 简写 阅读全文

posted @ 2019-01-11 13:22 winecork 阅读(128) 评论(0) 推荐(0) 编辑

2019年1月10日

操作列表

摘要: 遍历列表 range() #生成一系列数字,可添加参数控制步长,如:range(1,5,2)输出:1,3 list() #输出一个列表 min(),max(),sum() 列表解析 切片 元组:不能修改的列表,用圆括号表示,如(1,2,3) 阅读全文

posted @ 2019-01-10 22:47 winecork 阅读(122) 评论(0) 推荐(0) 编辑

导航