<div class="gmail_quote">On Tue, Jul 16, 2013 at 6:43 PM, John Ladasky <span dir="ltr"><<a href="mailto:john_ladasky@sbcglobal.net" target="_blank">john_ladasky@sbcglobal.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







Hi folks,<br>
<br>
No, I'm not asking for YOU to help ME with a Python homework assignment!<br>
<br>
Previously, I mentioned that I was starting to teach my son Python.<br>
<br>
<a href="https://groups.google.com/d/msg/comp.lang.python/I7spp6iC3tw/8lxUXfrL-9gJ" target="_blank">https://groups.google.com/d/msg/comp.lang.python/I7spp6iC3tw/8lxUXfrL-9gJ</a><br>
<br>
He just took a course at his high school called Web Technology and Design.  They had the students use tools like Dream Weaver, but they also hand-coded some HTML and JavaScript.  He has a little experience.  I am building on it.<br>








<br>
Well, a few other parents caught wind of what I was doing with my son, and they asked me whether I could tutor their kids, too.  I accepted the jobs (for pay, actually).<br>
<br>
The kids all claim to be interested.  They all want to write the next great 3D video game.  Thus, I'm a little surprised that the kids don't actually try to sit down and code without me prompting them.  I think that they're disappointed when I show them how much they have to understand just to write a program that plays Tic Tac Toe.<br>








<br>
Where programming is concerned, I'm an autodidact.  I started programming when I was twelve, with little more guidance than the Applesoft Basic manual and the occasional issue of Byte Magazine.  I hacked away.  Over the years, I have acquired a working knowledge of BASIC, 6502 assembly language, Pascal, C, and finally Python (my favorite).  If I knew how to impart a love of experimentation to my students, I would do that.<br>








<br>
One kid looks like he's ready to forge ahead.  In the mean time, one parent has recognized his son's lack of independence, and has asked me to assign programming homework.  I hope it doesn't kill the kid's enthusiasm, but I'm willing to try it.<br>








<br>
So, what I am seeking are suggestions for programming assignments that I can give to brand-new students of Python.  Please keep in mind that none of them are even up to the task of a simple algorithm like Bubble Sort -- at least, not yet.<br>








<br>
Many thanks!<br>
<span><font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br>Thanks for this!  I'm trying to put together something very similar right now for my younger brother, and this thread and associated links have been very helpful.  He's taught himself enough Python to make a rudimentary text adventure game already, so the interest is definitely there.  I'm hoping to sneak in some general CS concepts as well, although I'm concerned some things might be less obvious in Python.  Also, I learned to program in PHP and Java  before I learned Python (starting with a Django project), so I'm not sure how to start there... probably going to borrow some ideas from the intro level Java class I've been TA'ing.<br>

<br>In my experience, people learn best via projects, so I've been trying to come up with some that are interesting, not too difficult, and focus on one or two main concepts.  To be honest, I have no idea how realistic they are, because 
it's been a while since I first learned how to program and that wasn't 
even in Python.  Offering it up here for your perusal / feedback (roughly in the order I'd do them):<br><br>- text adventure: practice with stdlib, control flow, I/O. Lots of opportunities for embellishment here - create maps of rooms, load/save games by serializing into files or even a database, create status bars in the console, etc.<br>




<br>- blackjack:  a game with simple rules, you have to think about 
representation for the cards, and you can easily simulate a computer 
opponent.  extra credit: graphical front-end that displays images for 
the cards.<br>



<br>- sudoku checker/generator/solver: practice with lists, loops, logic, implementing algorithms.  extra credit: design a solver yourself without looking up algorithms.<br>

<br>- mandelbrot set app: math and graphics! can use this as an opportunity to introduce numpy/matplotlib, or DIY.  (could be a bit esoteric depending on the student, though.)<br><br>- game of life: simple graphics and update rules, fun to watch, source of the unofficial hacker emblem.<br>






<br>- (extra credit?) simple chat program: this doesn't really fit the theme, but it's an introduction to networking / sockets, which could be useful. (and the intro class had lots of fun sending messages back and forth in class.)<br>






<br>At this point, I'm hoping he'll be comfortable enough to begin working on a more complete game (most likely, using pygame, as he hasn't expressed much interest in 3D).  Some ideas for classic/simple/well-defined games to try:<br>

- blob game (what is this one actually called? where the player absorbs smaller entities to grow but dies if he runs into a bigger entity)<br>




- tank battle (again, not sure on the name. two players, moving around, shooting at each other on a map with obstructions)<br>- maze (bonus points for a maze generation algorithm)<br>- snake<br>- frogger<br>- asteroids<br>

- etc.<br><br>This doesn't include a lot of standard but less flashy stuff e.g. advanced data structures, graphs, sorting algorithms, because the idea was to find projects that would be tractable for someone just starting out and wanting to make fun things... but once they're hooked, you can explain how they're useful and start into those (at least, that's my theory).  But you could still 
talk about things like classes, OO design, exception handling, recursion, complexity
 (especially with the sudoku project),  as related to these projects.<br><br>(As a side note, I'm a bit amused by the discussions about teaching "kids" specifically.  When I was 17 I was a freshman enrolled in a Data Structures course, where I discovered that a course I took two years prior had already covered about 90% of the material...)<br>

<br>-beth<br>