摘要: Loops are often used in programs that compute numerical results by starting with an approximate answer and iteratively improving it.For example, one w... 阅读全文
posted @ 2014-06-18 15:24 平静缓和用胸音说爱 阅读(534) 评论(0) 推荐(0) 编辑
摘要: Computers are often used to automate repetitive tasks. Repeating identical or similar tasks without making errors is something that computers do well ... 阅读全文
posted @ 2014-06-10 14:44 平静缓和用胸音说爱 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 原文: http://www.javaworld.com/javaqa/2002-08/01-qa-0823-appvswebserver.html简单来说,web服务器提供页面给浏览器,而app服务器提供客户端可以调用的接口。具体而言,我们可以说:Web服务器处理HTTP请求,而app服务器基于多... 阅读全文
posted @ 2014-06-10 10:18 平静缓和用胸音说爱 阅读(7639) 评论(0) 推荐(0) 编辑
摘要: Keyboard inputPython provides a build-in function called raw_input (in version 2.x) that gets input from the keyboard. In Python 3.x we use input(). W... 阅读全文
posted @ 2014-05-01 15:28 平静缓和用胸音说爱 阅读(332) 评论(0) 推荐(0) 编辑
摘要: RecursionIt is legal for one function to call another; it is also legal for a function to call itself. It may not be obvious why what is a good thing,... 阅读全文
posted @ 2014-05-01 15:07 平静缓和用胸音说爱 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 1. Modulus operator (%)The modulus operator works on integers and yields the remainder when the first operand is divided by the second. In Python, the... 阅读全文
posted @ 2014-04-28 18:10 平静缓和用胸音说爱 阅读(507) 评论(0) 推荐(0) 编辑
摘要: 1. Write a function called square that takes a parameter named t, which is a turtle. It should use the turtle to draw a square.from TurtleWorld import... 阅读全文
posted @ 2014-04-24 16:13 平静缓和用胸音说爱 阅读(246) 评论(0) 推荐(0) 编辑
摘要: TurtleWorld provides a set of functions for drawing lines by steering turtles around the screen. You can download Swampy from allendowney.com/swampy.U... 阅读全文
posted @ 2014-04-24 14:05 平静缓和用胸音说爱 阅读(522) 评论(0) 推荐(0) 编辑
摘要: It may not be clear why it is worth the trouble to divide a program into functions. There are a lot of reasons; here are few:Creating a new function gives you an opportunity to name a group of statements, which makes your program easier to read and debug.Functions can make a program smaller by elimi 阅读全文
posted @ 2014-04-11 19:17 平静缓和用胸音说爱 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Python is an example of high-level language. As you might infer from the name “high-level language”, there are also low-level languages, sometimes referred to as “machine languages” or “assembly languages”. Loosely speaking, computers can only execute programs written in low-level languages. So prog 阅读全文
posted @ 2014-04-08 17:41 平静缓和用胸音说爱 阅读(409) 评论(0) 推荐(0) 编辑