11 2016 档案

摘要:资料来源:http://www.runoob.com/python/python-operators.html#ysf5 1、位运算符 转换成二进制一位一位运算 1 a = 60 # 60 = 0011 1100 2 b = 13 # 13 = 0000 1101 3 c = 0 4 5 c = a 阅读全文
posted @ 2016-11-30 20:06 一罐热茶 阅读(395) 评论(0) 推荐(0) 编辑
摘要:资料来源: http://www.runoob.com/python/python-operators.html#ysf5 1、逻辑运算符"与、或、非" 在Java、C中使用"&、||、!",在Python中使用"and,or,not" 优先级 not > and = or 1 #True和Fals 阅读全文
posted @ 2016-11-30 17:35 一罐热茶 阅读(371) 评论(0) 推荐(0) 编辑
摘要:1、一个十分简单的日语五十音字母查询程序 2、简单的程序但是调试了很久,把功能删到最简还是会出错,最后发现是Python的逻辑运算符是使用"and,or,not" 3、程序代码如下,想改成二维数组的直接查询 1 input_row = '请输入查询字母所在行:' 2 input_col = '请输入 阅读全文
posted @ 2016-11-30 16:37 一罐热茶 阅读(342) 评论(0) 推荐(0) 编辑
摘要:原博客地址 1、代码 1 #pythonz中的字符串可以用单引号''和双引号""标示 2 strA = 'This is string A' 3 strB = "This is string B" 4 print('strA = ' + strA) 5 print('strB = ' + strB) 阅读全文
posted @ 2016-11-29 23:26 一罐热茶 阅读(258) 评论(0) 推荐(0) 编辑
摘要:出处: Hongten的博客 Vamei的博客 1、for循环 GUI中的代码: 1 #基本的for循环语句 2 test_list = [2,4.4,'Liu','A',"B",'HelloPy',"Today"] 3 #打印列表的长度 4 print(len(test_list)) 5 for 阅读全文
posted @ 2016-11-29 12:29 一罐热茶 阅读(170) 评论(0) 推荐(0) 编辑
摘要:原博客地址 1、新建一个 .py文件,如test_hello.py; 2、右键,Edit with IDLE(即Python GUI) 3、编写代码 hello = "hello" print(hello) ##################################### test_lis 阅读全文
posted @ 2016-11-29 11:39 一罐热茶 阅读(446) 评论(0) 推荐(0) 编辑
摘要:Python 和 Django 按照博主Hongten的记录学习一遍,Hongten博主地址 python安装教程:python安装教程 Django安装教程:Django安装教程 列表运行示例: 1 1 >>> def create_empty_list(): 2 return [] 3 4 >> 阅读全文
posted @ 2016-11-28 13:10 一罐热茶 阅读(213) 评论(0) 推荐(0) 编辑