父与子的编程之旅

最新书摘:
  • Ocras
    2020-06-18
    ball = Ball(img_file, location)
  • 随若水
    2015-10-26
    对于变量名的几条规则:1、最重要的一点是名字是区分大小写的。2、变量名必须以字母或下划线字符开头。不能以数字开头3、变量名中不能包含空格。
  • Exquisiteness
    2015-05-15
    Instead of counting how many times to run a loop, while loops use a test to decide when to stop a loop. While loops are also called conditional loops. A conditional loop keeps looping while some condition is met.
  • Exquisiteness
    2015-05-12
    Comparison operators are also called relational operators (because they test the relation between the two sides: equal or not equal, greater than or less than). A comparison is also called a conditional test or logical test. In programming, logical refers to something where the answer is either true or false.
  • Exquisiteness
    2014-09-17
    Syntax ErrorsIf you tried to run this program, IDLE would pop up a message saying “There’s an error in your program: invalid syntax.” Then you would have to look at your code to see what’s wrong. IDLE will highlight (in red) the place where it found the error. It might not be exactly where the problem is, but it should be close.Runtime ErrorsThe second kind of error that can happen is one that Python (or IDLE) can’t detect before it runs the program. This kind of error only happens when the program runs, so it is called a runtime error.The line starting with Traceback is the start of the error message. The next line tells youwhere the error happened—the filename and line number. Then it displays the bad line of code. This helps you find where the problem is in your code. The last ...
  • 方東美
    2014-04-08
    字符串的开头和结尾必须使用同种类型的引号,如果键入一个数字而没有引号,python就会知道这表示数值,而不是字符。
  • S.M.Z
    2012-02-07
    elif tries == 6:
  • 适兕
    2011-03-15
    Yikes! How did that happen? Carter, I think your computer is going crazy!
  • 刘莉莉
    2012-08-21
    Three people ate dinner at a restaurant and want to split the bill. The total is $35.27, and they want to leave a 15 percent tip. How much should each person pay?
  • 刘莉莉
    2012-08-21
    3个人在餐厅吃饭,想分摊饭费。总共话费35.27美元,他们还想留15美分的小费。每个人该怎么付钱?