views:

253

answers:

10

This post is related to my older one: summer-holiday-programming-club - Which language suits best?. Please read it first if you don't know about the background of this question.

After deciding about a programming language I am now looking for simple examples that can be easily implemented in Python and help to understand basic concepts.

Until now I've thought about the following:

  • number-search
  • dice-games
  • (capital-)quiz
  • vocabulary-trainer

With "number-search" I mean a simple game where player A enters a number (in a limit, of course) and player B has to guess it. Player A gives hints whether his number is greater or smaller than player B's guess. It can be implemented with either player A being human and B the computer or vice versa.

Dice-games can be simple ones like "Under Over" or the one that is called "Mäxchen" or "Maier" in German (Sorry, I don't know the English name).

Quizzes and the vocabulary-trainer shall mainly show the functionality of a "Dictionary".

What do you think about those possibilities? What else can you think of (Remembering of course that we are talking about 12-17 year olds that don't have any experience in programming)?

+2  A: 

Your examples sound reasonable. I would also suggest having the kids work through selected parts of the Python tutorial, which will simultaneously teach them about programming in general and Python programming in particular. Some of the easier Project Euler problems might also be worthwhile.

las3rjock
Thank you for your answer, Project Euler looks quite like a ressource for problems that I can use well.
Kevin D.
+2  A: 

Have you looked at PyGame? Once you've got the basic introductory stuff out of the way, I don't think it'll be beyond the abilities of a bunch of teenagers to knock up a fairly cool arcade-style game in PyGame.

Daniel Roseman
I had a look on PyGame and I am quite sure that I will use it somehow. I will have a thought on programming an arcade style game, thank you :)
Kevin D.
Another advantage of pygame is that it has tons of great tutorials for beginning programmers ((http://www.pygame.org/wiki/tutorials))
TokenMacGuy
+1  A: 

Jotto is a good game to program. I recently coded it in Ruby for a PL class. Take a look at the example problems from SICP, too. They're in Scheme, but could give you ideas.

Evan Meagher
Thank you for your reply. I had a look on Jotto and I will consider it. I will also have a closer look on the SICP problems.
Kevin D.
+1  A: 

If you want to show them some graphics, there are libraries out there, such as PyGame, that might make it easier and a little flashier.

You could also try a card game, such as blackjack, which isn't too bad.

And don't forget, the students don't have to write everything. You can provide a foundation which they build on top of or start a project and let them finish it. In one of my first computer science courses in school, our teacher assigned us to do a project where a user navigates a 3d maze. He provided us all the graphics and high level stuff, but we were responsible for the logic of the game (such as the array of spaces on the map). We learned the basics this way, but it was a lot more entertaining than just a guess the number game.

samoz
Thank you :) I didn't think of that until now. Of course you are right. If I provided the graphic stuff it would make things much easier and one can focus on the elementary stuff. PyGame of course will play a role in my planning.
Kevin D.
+4  A: 

Your examples are good, but, understandably, they're all text-focused -- I fear that some kinds might lose attention because of that. The Sande's Hello World book uses EasyGui (as well as Python of course) to make things graphical and colorful in the easiest possible way, and it's aimed to young kids (even younger than your target: their son, for whom they developed the book, is in elementary school).

I highly recommend you look at it -- and more importantly so does my wife Anna, who knows more about teaching programming to beginners &c than just about anybody else I know. Anna recommends finding out what their interests are and how to work them into some project, so their motivation is strong -- "don't make the teacher happy, make the students happy!" (and I quote her directly) so they'll continue programming because they've seen how it can make their lives better.

Alex Martelli
Thank you Alex, and thank you Anna. You are absolutely right with what you say. I will try to have a meeting with the interested pupils and ask them what they want to do. I will also consider EasyGUI as it seems pretty... easy :)
Kevin D.
+1  A: 

Give them puzzles that are competitive in nature.. a lot of people learn really fast when trying to outdo their peers.
You could give them starter code for a tic-tac-toe game and ask them to build a computer player for it.. which would then compete against other people's computer players.

adi92
Thats also a nice idea, I will try to add competitive elements and KI-battles (at least one...) into my planning. Thank you.
Kevin D.
By the way: With "KI" I meant "AI" (KI is the German equivalent...)
Kevin D.
+1  A: 

I prefer actual casino games because they're a hair more complex. And they teach an important lesson about the house always winning.

Roulette, for example, allows easy simulation of the wheel with selection from numbered bins. It has easy decision-making (did the bet win or lose?) and easy math (payout at 2:1, etc.)

Further, you can dive into the various kinds of bets (hi-lo, even-odd, red-black) each of which requires slightly different if-statements. The column bets require using the % operator and understanding modulus arithmetic (well, a little).

You can -- for the really advanced students -- move on to combination bets of 2, 3 or 4 "adjacent" numbers. (2 is easy, except at the edges. 3 is a 'row' of 3. 4 is challenging.)

Craps, as another example, is stateful, leading to interesting state change rules and rules on which bets are allowed and not allowed.

Blackjack may be a bit hard, because modeling cards, decks and the dealer shoe can be rather complex to simulate realistic deals from a subset of the available cards in the shoe.

See http://homepage.mac.com/s_lott/books/oodesign.html for specific programming exercises.

S.Lott
Thank you for your reply. I will take your advices into account. Especially the roulette-thing got me interested. :)
Kevin D.
A: 

Maybe you can find something in the old Computer Recreations column from Scientific American. I had lots of fun with some of the projects when I was in school. They cover many exciting and timeless topics from computer science and science in general (cellular automata, fractals, genetic algorithms,...). They also give enough hints to make the implementation relatively straight forward for novice programmers, but at the same time there is lots of potential for extensions and generalisations.

Unfortunately I was not able to find any good links, but maybe you can find them at a library or with some more searching (I think they published two digest books).

nikow
A: 

http://projecteuler.net/

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

Good site for challenges. Might not guide you much within your own language but could help.

Jon
A: 

I want one ese for summer holidays. please help me because I am albanian and I dont know the language very vell so can you help me to write one ese. bye thank you