2017年8月9日
摘要: 1\if语句:if condition 是True,执行if clause语句,并跳过后面的elif或else语句;执行一次 2\while语句;只要while condition是True,就会执行while clause语句,执行完后回头再看while condition的判断值; 只要cond 阅读全文
posted @ 2017-08-09 22:31 auleon 阅读(2254) 评论(0) 推荐(0) 编辑
摘要: 1\直接输出数值和字符串类型: 1 print(2) 2 print('hello world') 2\ 阅读全文
posted @ 2017-08-09 22:26 auleon 阅读(172) 评论(0) 推荐(0) 编辑
摘要: A\The differences between == and = operators: 1 the == operator(equal to) asks whether two values are the same as each other; 2 the = operator(assignm 阅读全文
posted @ 2017-08-09 22:22 auleon 阅读(245) 评论(0) 推荐(0) 编辑
  2017年8月8日
摘要: 1、DOS下清屏命令:cls 2、DOS下输入python进入Python交互界面,此时输入的命令在Python中执行,故输入cls报错,应先CTRL+Z退出python界面 3、/除 //整除 %取余 ** 幂运算 4、中括号[]和大括号{}有特殊的意义,在数学运算中都用()来表示 5、input 阅读全文
posted @ 2017-08-08 23:36 auleon 阅读(724) 评论(0) 推荐(0) 编辑
摘要: 区别于其他语言,python中字符串可以用3中方法表示,且都能被正确编译: 1、'mary' 单引号括起来 2、"it's a great day" 双引号括起来 3、''' nice to meet you, my dear friend. ''' 三引号括起来 区别: a、单引号和双引号没有什么 阅读全文
posted @ 2017-08-08 14:09 auleon 阅读(784) 评论(0) 推荐(0) 编辑
  2017年8月7日
摘要: JAVA中注释: // 注释一行 /*...*/ 注释若干行 /**...*/ 注释若干行,并写入Javadoc文件 Python注释: # 单行注释符 ''' 三对单引号 ''' 或"""三对双引号""" 是多行注释符 阅读全文
posted @ 2017-08-07 23:00 auleon 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 1、由数字、字母和下划线组成; 2、不能由数字开头,不能含有特殊字符和空格; 3、不能以保留字命名; 4、变量的命名应该有意义; 5、尽量不要使用中文; 6、命名方式有驼峰式、下划线分割; 7、Python变量区分大小写; 阅读全文
posted @ 2017-08-07 22:40 auleon 阅读(144) 评论(0) 推荐(0) 编辑