最初的问题

我目前正在教我弟弟编程。他完全是个初学者,但很聪明。(他真的很想学)。我注意到我们的一些会议陷入了一些小细节,我觉得我不是很有条理。(但这篇文章的答案有很大帮助。)

我怎样才能更好地有效地教他?是否有一个逻辑顺序,我可以用一个概念一个概念地运行?是否有什么复杂的问题我应该在以后再讨论?

我们正在使用的语言是Python,但任何语言的建议都是受欢迎的。


如何提供帮助

如果你有好的答案,请在你的答案中添加以下内容:

初级练习和项目想法 初学者教学资源 屏幕视频/博客文章/免费电子书 印刷适合初学者的书籍

请用链接描述资源,以便我可以看一看。我想让每个人都知道,我确实在使用其中的一些想法。你提交的内容将在这篇文章中汇总。


初学者在线教学资源:

A Gentle Introduction to Programming Using Python How to Think Like a Computer Scientist Alice: a 3d program for beginners Scratch (A system to develop programming skills) How To Design Programs Structure and Interpretation of Computer Programs Learn To Program Robert Read's How To Be a Programmer Microsoft XNA Spawning the Next Generation of Hackers COMP1917 Higher Computing lectures by Richard Buckland (requires iTunes) Dive into Python Python Wikibook Project Euler - sample problems (mostly mathematical) pygame - an easy python library for creating games Invent Your Own Computer Games With Python Foundations of Programming for a next step beyond basics. Squeak by Example Snake Wrangling For Kids (It's not just for kids!)


推荐印刷书籍的教学初学者

加速c++ Python编程绝对初学者 Charles Petzold编写的代码 Python编程:计算机科学介绍第二版


当前回答

Microsoft Small Basic是一个免费的基于。net的编程环境,旨在为初学者提供一个“有趣”的学习环境。该语言是VB的一个子集。NET,甚至包含一个Logo语言中熟悉的“Turtle”对象。该网站包含一个循序渐进的教程。

其他回答

学习任何东西最好的方法就是从基础开始。你可以找到任何一本好的教科书来解释什么是编程,内存,算法。

下一步选择语言,这取决于老师知道什么或者学生为什么想学。

然后就是代码,代码,代码。对书中的每个例子进行编码。然后稍微改变它来做另一个动作。学习编程是一个主动的过程,而不是被动的过程。你不能只读了Dietal写的c++如何编程,然后就指望在阅读时不主动地编写c++代码。

即使你是一个有经验的程序员,写书中的代码来学习一些新东西也会有帮助。

我认为Python是个好主意。我会给他一些基本的任务让他自己去做,并告诉他,他遇到的任何死胡同都可以通过谷歌来解决。至少对我来说,自己解决问题总比别人告诉我解决方案更好。

一些可能的项目(排名不分先后):

Coin flip simulator. Let the user input a desired number of trials for the coin flipping. Execute it and display the results along with the percentage for heads or tails. Make a temperature converter with a menu that takes user input to choose which kind of conversion the user wants to do. After choosing the conversion and doing it, it should return to the main menu. Here's an example of an extended converter with the same idea: http://pastebin.org/6541 Make a program that takes a numeric input and displays the letter grade it would translate to. It'll end up evaluating the input against if and elif statements to find where it fits. Make a simple quiz that goes through several multiple choice or fill in the blank questions. At the end it will display how the user did. He can pick any questions he wants. Take an input of some (presumably large) number of pennies and convert it into bigger denominations. For example, 149 pennies = 1 dollar, 1 quarter, 2 dimes, and 4 pennies. Create a simple list manager. Be able to add/delete lists and add/delete entries in those lists. Here's an example of a christmas list manager: http://pastebin.org/6543 Create a program that will build and then test whether entered numbers form a magic square (with a 2D array). Here's some sample code, but it should really print out the square at each step in order to show where the user is in terms of buliding the square: http://pastebin.org/6544

我还建议用xTurtle或其他图形模块做一些事情,把事情混合起来,让他不会感到无聊。当然,这是非常多的实践编程,而不是很多人真正使用python的脚本,但我给出的例子几乎直接取自我通过python学习的时候,它对我来说非常有用。好运!

我强烈推荐John Zelle所著的Python编程:计算机科学介绍第二版。它面向初学者,并处理编程的语义。阅读后,您将能够更快地学习其他语言,因为Zelle的语义vs.语法方法。点击这里查看详情!

一旦他掌握了基本知识,我建议他去河内塔作为一个很好的锻炼。 如果你有木制玩具,我建议你从木质玩具开始;让他试着自己解决这个问题,并系统地描述他的方法。告诉他递归在哪里发挥作用。给他解释一下,棋局的多少取决于棋牌的多少。 然后让他写一个程序,用你选择的语言打印出动作的顺序。

这完全取决于你哥哥的学习风格。许多人通过亲自动手学习,在学习和积累知识的过程中明确概念和大局,从而学得更快。

对我来说,我更喜欢从大局出发,深入到细节。我想知道的第一件事是它是如何组合在一起的,然后是面向对象的官样文章,然后是类和实例等等。在我学习语法之前,我喜欢了解基本的概念和一点理论。我有一点优势,因为我在20年前用BASIC写过一些游戏,但之后就没有什么了。

也许在实际编写代码之前,先从总体任务陈述开始,然后是计划和/或流程图,然后细化成一些伪代码(倾向于您最终将使用的语法),这是很有用的。

这里的黄金法则就是弄清楚你学生的学习风格。