- 当计算机表现出色时,我们会把它们视为队友,而当他们表现格外固执或粗鲁时,我们会以同样的方式来对待它们。
When they work well, we think of them as teammates, and when they are obstinate or rude, we respond to them the same way we respond to rude, obstinate people .
- 一种方法是把计算机想象成一个具有某些优势的雇员,比如速度和精度,同时它们也有某些特定的弱点,比如缺乏同理心和无法把握大局。
One approach is to think of the computer as an employee with certain strengths, like speed and precision, and particular weaknesses, like lack of empathy and inability to grasp the big picture.
- 你的工作就是成为一名优秀的管理者:找到一种方式来扬长避短。同时找到利用你的情绪来解决问题的方法,不要让你的情绪影响你有效工作的能力。
Your job is to be a good manager: find ways to take advantage of the strengths and mitigate the weaknesses. And find ways to use your emotions to engage with the problem, without letting your reactions interfere with your ability to work effectively.
- 现在故意犯错误总比以后意外犯错误要好
It is better to make mistakes now and on purpose than later and accidentally.小实验
实验一:
In a print statement, what happens if you leave out one of the parentheses, or both?
在print语句中,如果省略了一个或两个括号,会发生什么情况?
SyntaxError: invalid syntax. 语法错误:无效语法
实验二:
If you are trying to print a string, what happens if you leave out one of the quotation marks, or both?
如果当你在尝试打印一个字符串(string)时,省略了一个引号或两个引号会发生什么?
SyntaxError: unterminated string literal (detected at line 1) 语法错误:未终止的字符串文字
实验三:
You can use a minus sign to make a negative number like -2. What happens if you put a plus sign before a number? What about 2++2?
**你可以使用减号表示负号,如-2. 如果把加号放在数字前面会发生什么? 如2++2? **
>>> print(2++2) 4
实验四:
In math notation, leading zeros are ok, as in 09. What happens if you try this in Python? What about 011?
在数学符号中,前面的0是可以的,比如09。如果在Python中尝试此操作会发生什么? 如011?
SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers 语法错误:不允许在十进制整数字面值中使用前导零;八进制整数使用0o前缀
实验五:
What happens if you have two values with no operator between them?
如果两个值之间没有操作符,会发生什么?
SyntaxError: invalid syntax 语法错误:无效语法



