摘要: 3.1. Using Python as a CalculatorLet’s try some simple Python commands. Start the interpreter and wait for the primary prompt, >>>. (It shouldn’t take... 阅读全文
posted @ 2015-03-14 00:09 Jeremy123 阅读(323) 评论(0) 推荐(0) 编辑
  2015年6月26日
摘要: 虽然安装linux的步骤非常简单,但是也碰到了一些磕磕碰碰,在此记录一些自己遇到的问题。我选用的vmware workstation 11 + CentOS 7 1503.安装 centos 7时,请选用 vmware workstation 10及以上,否则 wmware tools 安装不上,反... 阅读全文
posted @ 2015-06-26 21:21 Jeremy123 阅读(517) 评论(0) 推荐(0) 编辑
  2015年3月20日
摘要: 8.1. Syntax ErrorsSyntax errors, also known as parsing errors, are perhaps the most common kind of complaint you get while you are still learning Pyth... 阅读全文
posted @ 2015-03-20 22:16 Jeremy123 阅读(4933) 评论(0) 推荐(0) 编辑
  2015年3月19日
摘要: There are several ways to present the output of a program; data can be printed in a human-readable form, or written to a file for future use. This cha... 阅读全文
posted @ 2015-03-19 22:36 Jeremy123 阅读(1707) 评论(0) 推荐(1) 编辑
  2015年3月18日
摘要: 6. ModulesIf you quit from the Python interpreter and enter it again, the definitions you have made (functions and variables) are lost. Therefore, if ... 阅读全文
posted @ 2015-03-18 23:32 Jeremy123 阅读(1903) 评论(0) 推荐(2) 编辑
  2015年3月15日
摘要: 5.2. The del statementThere is a way to remove an item from a list given its index instead of its value: the del statement. This differs from the pop(... 阅读全文
posted @ 2015-03-15 22:58 Jeremy123 阅读(1270) 评论(0) 推荐(0) 编辑
摘要: 5. Data StructuresThis chapter describes some things you’ve learned about already in more detail, and adds some new things as well.这一章节将更详细的描述你已经学到的东西... 阅读全文
posted @ 2015-03-15 00:45 Jeremy123 阅读(764) 评论(2) 推荐(1) 编辑
  2015年3月14日
摘要: 4.6. Defining FunctionsWe can create a function that writes the Fibonacci series to an arbitrary boundary:我们创建一个斐波那契数列的函数:>>> def fib(n): # write F... 阅读全文
posted @ 2015-03-14 20:21 Jeremy123 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 4.1. if StatementsPerhaps the most well-known statement type is the if statement. For example:if语句可能是最常见的控制流语句了,例如:>>> x = int(input("Please enter an ... 阅读全文
posted @ 2015-03-14 15:40 Jeremy123 阅读(706) 评论(0) 推荐(0) 编辑
摘要: 3.1.3. ListsPython knows a number of compound data types, used to group together other values. The most versatile is the list, which can be written as... 阅读全文
posted @ 2015-03-14 00:32 Jeremy123 阅读(213) 评论(0) 推荐(0) 编辑