⇤ ← Revision 1 as of 2006-12-29 02:58:49
Size: 1662
Comment:
|
← Revision 2 as of 2009-12-25 07:13:54 ⇥
Size: 1671
Comment: converted to 1.6 markup
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
[:StartProgramming: (首页)开始编程之旅] 翻译自Lee Harr的[http://staff.easthighschool.net/lee/computers/book/Start_Programming.html Start Programming] |
[[StartProgramming| (首页)开始编程之旅]] 翻译自Lee Harr的[[http://staff.easthighschool.net/lee/computers/book/Start_Programming.html|Start Programming]] |
Line 7: | Line 7: |
本文是使用[http://www.nongnu.org/pygsear/ pygsear]+[http://pygame.org pygame]作为开发环境,以初级用户角度来分步分阶段学习[http://www.python.org PYTHON]基本概念,并以小游戏开发项目为具体案例,介绍的十分详细。编写风格清新朴实,没有象一般教科书那样枯燥,极其适合初级用户来激发兴趣时使用。 | 本文是使用[[http://www.nongnu.org/pygsear/|pygsear]]+[[http://pygame.org|pygame]]作为开发环境,以初级用户角度来分步分阶段学习[[http://www.python.org|PYTHON]]基本概念,并以小游戏开发项目为具体案例,介绍的十分详细。编写风格清新朴实,没有象一般教科书那样枯燥,极其适合初级用户来激发兴趣时使用。 |
Line 9: | Line 9: |
[[TableOfContents]] | <<TableOfContents>> |
(首页)开始编程之旅 翻译自Lee Harr的Start Programming 本文是使用pygsear+pygame作为开发环境,以初级用户角度来分步分阶段学习PYTHON基本概念,并以小游戏开发项目为具体案例,介绍的十分详细。编写风格清新朴实,没有象一般教科书那样枯燥,极其适合初级用户来激发兴趣时使用。
Contents
1. StartProgramming-1-9 练习Exercises
- Play the practice.py game to get used to moving the penguin around. Read the comments at the start of the file to see how to play. (Hint)
- You made pete move in a square. Now make him go in a rectangle that is twice as wide as it is high. (Hint)
- Now see if you can make pete go in a triangle. (Hint)
- Use a variable distance to make pete walk in a square or triangular spiral. (Hint)
- Make two different loops -- one to draw a pentagon and one to draw a five-pointed star. (Hint)
- Turn exercise 4 in to both a for loop and a while loop. (Hint)
- Create functions for triangle and pentagon like we made for square. Make the functions take a parameter for the length of a side. (Hint)
- Create a function which takes a sequence of strings and writes them around the edges of a polygon with one side for each string. (Hint)
- Create a function which takes a sequence of strings and writes each one on a separate line, one above the next. (Hint)