摘要: 1、for循环 01234 2、for-else j=3012yes! j=5012 3、for-continue j=50124 阅读全文
posted @ 2018-01-23 00:24 cross10 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1、while True循环 输出结果: 0123 …… 2、while <条件> 循环 输出结果: 012 3、while-if循环 输出结果: The age of Tom:1too smallerThe age of Tom:16too biggerThe age of Tom:17too b 阅读全文
posted @ 2018-01-22 23:35 cross10 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1、if-else语句 输出结果: The age of Tom:15The age of Mary:14Tom older than Mary. 2、if-elif-else The age of Tom:11The age of Mary:11Mary is as old as Tom. 阅读全文
posted @ 2018-01-22 22:50 cross10 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1、Python注释 2、Python格式化输出 输出结果: name=Tomage=15job=student info of Tom Name=TomAge=15Job=student 输出结果: name=Jackage=26job=teacher info of Jack Name=Jack 阅读全文
posted @ 2018-01-22 22:26 cross10 阅读(548) 评论(0) 推荐(0) 编辑
摘要: 1、Python定义变量 打印结果: name=cross10 2、Python变量赋值 Python通过input输入的参数默认为string类型 打印结果: age=15 age type is: <class 'str'> 3、Python类型转换 打印结果: age=15age type i 阅读全文
posted @ 2018-01-22 22:05 cross10 阅读(1076) 评论(0) 推荐(0) 编辑
摘要: 1、Python输出语句 打印结果: Hello World ! 2、Python输入语句 打印结果: How to spell 'good': good 注:\n 换行 阅读全文
posted @ 2018-01-22 21:04 cross10 阅读(142) 评论(0) 推荐(0) 编辑