Re: Homework help requested (not what you think!)

2013-07-18 Thread Beth McNany
On Tue, Jul 16, 2013 at 6:43 PM, John Ladasky john_lada...@sbcglobal.netwrote:

 Hi folks,

 No, I'm not asking for YOU to help ME with a Python homework assignment!

 Previously, I mentioned that I was starting to teach my son Python.

 https://groups.google.com/d/msg/comp.lang.python/I7spp6iC3tw/8lxUXfrL-9gJ

 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.

 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).

 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.

 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.

 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.

 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.

 Many thanks!
 --
 http://mail.python.org/mailman/listinfo/python-list


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.

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):

- 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.

- 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.

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

- 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.)

- game of life: simple graphics and update rules, fun to watch, source of
the unofficial hacker emblem.

- (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.)

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

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 

Re: Homework help requested (not what you think!)

2013-07-18 Thread Albert van der Horst
In article mailman.4786.1374021635.3114.python-l...@python.org,
Chris Angelico  ros...@gmail.com wrote:
On Wed, Jul 17, 2013 at 8:43 AM, John Ladasky
john_lada...@sbcglobal.net wrote:
 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.


The disillusionment of every novice programmer, I think. It starts out
as I want to learn programming and make a game. Real programming is
more like I can automate mundane tasks, which doesn't sound half as
exciting. But this is why I'm dubious of programming courses that
actually try to hold onto the let's make a game concept, because the
students are likely to get a bit of a let-down on realizing that it
really doesn't work that easily (this is a two-week course, at the
end of it I should have written the next insert name of popular game
for all my friends).

Now comes the Forth experience.

I did the following experiment with a psychology student, who had
never been exposed to computers and had no prior experience. He
aquired a Jupiter Ace, which has Forth as a built in language. So his
only exposure was to Forth. Now I started to teach him programming,
using the cartoon book starting Forth. Once in a weeek we sat
together and worked through some exercises.

After 6 weeks he surprised me. He had programmed the game pong
which is a simple table tennis like game, where you have to
keep a ball in play.
He never gave me a a chance to prevent him having a traumatic experience
of failure by telling him that was not a task a novice should start.
Or for that matter that such any real time programming requires considerable
up front planning and design.
[This was an adult, and at the time university students in the
Netherlands were certified intelligent and skilled and disciplined
in learning.]

The lesson that is in there for you is to not hold your students back.
They may surprise you!

Groetjes Albert







ChrisA
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spearc.xs4all.nl =n http://home.hccnet.nl/a.w.m.van.der.horst

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-18 Thread Gene Heskett
On Thursday 18 July 2013 09:04:32 Albert van der Horst did opine:

 In article mailman.4786.1374021635.3114.python-l...@python.org,
 
 Chris Angelico  ros...@gmail.com wrote:
 On Wed, Jul 17, 2013 at 8:43 AM, John Ladasky
 
 john_lada...@sbcglobal.net wrote:
  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.
 
 
 The disillusionment of every novice programmer, I think. It starts out
 as I want to learn programming and make a game. Real programming is
 more like I can automate mundane tasks, which doesn't sound half as
 exciting. But this is why I'm dubious of programming courses that
 actually try to hold onto the let's make a game concept, because the
 students are likely to get a bit of a let-down on realizing that it
 really doesn't work that easily (this is a two-week course, at the
 end of it I should have written the next insert name of popular game
 for all my friends).
 
 Now comes the Forth experience.
 
 I did the following experiment with a psychology student, who had
 never been exposed to computers and had no prior experience. He
 aquired a Jupiter Ace, which has Forth as a built in language. So his
 only exposure was to Forth. Now I started to teach him programming,
 using the cartoon book starting Forth. Once in a weeek we sat
 together and worked through some exercises.
 
 After 6 weeks he surprised me. He had programmed the game pong
 which is a simple table tennis like game, where you have to
 keep a ball in play.
 He never gave me a a chance to prevent him having a traumatic experience
 of failure by telling him that was not a task a novice should start.
 Or for that matter that such any real time programming requires
 considerable up front planning and design.
 [This was an adult, and at the time university students in the
 Netherlands were certified intelligent and skilled and disciplined
 in learning.]
 
 The lesson that is in there for you is to not hold your students back.
 They may surprise you!
 
 Groetjes Albert
 
I'll 2nd those thoughts, and tell 2 or 3 stories.

When the Timex 1000 was new, I bought one for my kids and turned them loose 
with it.  Within a week my 10 year old had composed a car graphic, and 
written a small program to drive it around on the screen.

Back in a slightly newer time frame, Mr. Brodie's Forth, where you built 
your own extensions to the language, was used for a time at a small CA 
hospital as the hospitals accounting system, on a machine with only 64k of 
dram.  A TRS-80 Color Computer we now call the old grey ghost.

Fast forward 5 years from then, I wrote a program to work with a Grass 
Valley Group 300-3A/B television video switcher, which you could teach to 
do tricks, but it didn't have a means to save and reload them without 
buying a $20,000 EDISK accessory package.

So I wrote one in Basic09, running on a Color Computer 2, still only 64k of 
dram, based on a copy of the com protocol that had come with the switcher 
when we had purchased it used from KTLA-TV.  I wrote it on station time, 
and sold the station the hardware at about what it was worth at the time 
for a coco2 and 2 disk drives, $275.  14 years later as I was getting ready 
to retire and no one else knew that switcher, it was replaced, and my 'E-
DISK' was no longer needed, so they gave it to me, so I still have it in my 
'coco' collection in the basement.

Moral of course is never tell somebody it can't be done, he'll eat your 
lunch by doing it.  Oh, BTW, mine was 4x faster, and instead of a 2 hex 
digit display for file names, gave the tech directors English filenames on 
a small video screen.  They loved it because each one could then have his 
own personalized bag of video tricks to use during a news cast.

 ChrisA


Cheers, Gene
-- 
There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order.
-Ed Howdershelt (Author)
My web page: http://coyoteden.dyndns-free.com:85/gene is up!
My views 
http://www.armchairpatriot.com/What%20Has%20America%20Become.shtml
Syntactic sugar causes cancer of the semicolon.
-- Epigrams in Programming, ACM SIGPLAN Sept. 1982
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
 law-abiding citizens.
-- 
http://mail.python.org/mailman/listinfo/python-list


RE: Homework help requested (not what you think!)

2013-07-18 Thread Joseph Clark
Not to open Pandora's box or anything, but are you aware of the Roguelike 
community (subculture?) (cult?) of game development?  Rogue was an old 
text-based role playing game for Unix, text-based in the sense that it used 
the console as a 2D map and ASCII characters as graphics.  There has been a 
sort of revival of the genre and a lot of amateur game developers have done 
some simple or complex variations on the theme.  They're not all RPGs.  The 
category is defined by a few commonalities like procedural content generation.

There are very active forums and an extensive wiki.  I think these might be 
particularly appropriate fodder for a tutoring experience because they are 
neatly broken down into bite-sized chunks.  One day you could do procedural map 
generation, another day AI, etc.  And all these lessons generalize to the 
professional game development world.

Look at this forum: http://forums.roguetemple.com/index.php?board=7.0
This wiki: http://roguebasin.roguelikedevelopment.org/index.php?title=Main_Page 
This Python tutorial: 
http://roguebasin.roguelikedevelopment.org/index.php?title=Complete_Roguelike_Tutorial,_using_python%2Blibtcod

By the way, I tried my hand at Markov chain name generation, too.  My python 
code is at 
https://github.com/joeclark77net/jc77rogue/blob/master/program/namegen.py
and what it does is read a corpus of names and generate new names that sound 
like that corpus.  So you feed it a list of Roman names and it will give you 
fake names that sound Roman.

// joseph w. clark , phd , visiting research associate
\\ university of nebraska at omaha - college of IST

 Date: Tue, 16 Jul 2013 15:43:45 -0700
 Subject: Homework help requested (not what you think!)
 From: john_lada...@sbcglobal.net
 To: python-list@python.org

 Hi folks,

 No, I'm not asking for YOU to help ME with a Python homework assignment!

 Previously, I mentioned that I was starting to teach my son Python.

 https://groups.google.com/d/msg/comp.lang.python/I7spp6iC3tw/8lxUXfrL-9gJ

 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.

 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).

 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.

 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.

 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.

 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.

 Many thanks!
 --
 http://mail.python.org/mailman/listinfo/python-list   
   
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-17 Thread alex23

On 17/07/2013 8:43 AM, John Ladasky wrote:

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.


One possible approach would be to pick existing games developed in 
PyGame and assist them to modify or extend them. This can be a lot less 
overwhelming than starting a game from scratch, and exposes them to the 
basic concepts such as the main event loop, separating out logic from 
display etc. Code reading is as valuable a skill as code writing.


Another possibility is using a more extensive framework like Unity, 
which provides a lot of the toolchain to simplify the development 
process. While Unity doesn't support Python by default, it does provide 
Boo, which is Python-inspired. It's also built on top of the Mono 
framework, and I believe people have had some success with using .NET's 
IronPython with it.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-17 Thread Steven D'Aprano
On Tue, 16 Jul 2013 15:43:45 -0700, John Ladasky wrote:

 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.

I morn the death of Hypercard :(

http://www.loper-os.org/?p=568

Using Hypercard was like using Lego. You could literally copy and paste 
buttons from one app to another -- not code, the actual GUI button -- to 
copy their functionality.


You could try Pythoncard:

http://pythoncard.sourceforge.net/


 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.

Alas, I don't think there is *any* system for GUI programming that comes 
even close to what is needed to keep the majority of new students 
interested. But you might have some success with text-based games. Here 
are two suggestions:

- guess the number


- twenty questions (is it bigger than a breadbox?)




You might also like to investigate Inform-7.

http://inform7.com/


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-17 Thread Joshua Landau
On 16 July 2013 23:43, John Ladasky john_lada...@sbcglobal.net wrote:

 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).

 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.

 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.

 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.

 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.


As probably the youngest regular on this list (still not a kid any
more though, as much as I would like to be) it's always been my
experience that if you see someone young who says I'm really
interested in how to program! they already either know a little (or a
lot) or they're probably somewhat deluded. Programming's so easy to
learn solo that if they haven't at least tried, they're just not as
interested as they say ;).

For homework I actually recommend reading assignments. Something that
gets you straight there. When I taught a few people (back not that
long ago to A-level [UK], once-a week lunchtime things) the first
thing everyone went through were these:

https://groups.google.com/forum/#!category-topic/learn-how-to-program---matthew-arnold/help-for-lesson-1/cKy43xj56y4
https://groups.google.com/forum/#!category-topic/learn-how-to-program---matthew-arnold/help-for-lesson-2/iR6pMtsgFjA

Note that I rather quickly stopped using the forum above, as with
https://sites.google.com/site/learnhowtoprogram/, which I only really
used to host code we needed (I got too lazy to update the rest,
basically), so there's nothing else woth checking. I give you 100%
free permission to steal anything of mine from those links, though.

I'm no teaching expert, but these seemed to help people get the idea.
The basic concept is that before you learn to write, you learn to
read. If you give them well-documented (like, every line is
documentation¹) code or something like the duo of links I posted above
it will probably be a lot more meaningful than asking them to do
something trivial they already know.

I hear from a lot of people over teh netz that they learnt how to code
from reading OSS. I personally didn't do most of my learning that way,
but it doesn't mean that it doesn't work. The person from my lessons
who learnt the most was the guy who of his own choice took some of the
code we were working on and changed it at home without prompting to do
something else. At the beginning there was no way he could write code
that was marginally useful, and thus doing so would have been
massively boring and discouraging -- giving him a platform he could
work on made it much easier to do something useful.


I hope I inspired a few thoughts, I'm not giving you the One True Way
but these ideas should at least be blocks you can build with.

¹ See https://sites.google.com/site/learnhowtoprogram/Snake.py (which
might have a purposeful bug in there, it's been a small while since I last
ran it). That was for almost-new coders, with the aim of giving them
something they originally could read but not really understand, and by
gradually editing the code together they ended up getting it.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-17 Thread PythonAB

On 17 jul 2013, at 08:35, alex23 wrote:

 On 17/07/2013 8:43 AM, John Ladasky wrote:
 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.
 
 One possible approach would be to pick existing games developed in PyGame and 
 assist them to modify or extend them. This can be a lot less overwhelming 
 than starting a game from scratch, and exposes them to the basic concepts 
 such as the main event loop, separating out logic from display etc. Code 
 reading is as valuable a skill as code writing.
 
 Another possibility is using a more extensive framework like Unity, which 
 provides a lot of the toolchain to simplify the development process. While 
 Unity doesn't support Python by default, it does provide Boo, which is 
 Python-inspired. It's also built on top of the Mono framework, and I believe 
 people have had some success with using .NET's IronPython with it.

another vote for Unity here...
We teach that at the filmschool here in Holland and it's a
really well supported package.
There's a free version and it exports to Windows, OSX,
Linux, Playstation, XBOX, iPhone etc etc
But that comes at the cost already mentioned by Alex above...
http://en.wikipedia.org/wiki/Unity_(game_engine)
http://unity3d.com/

One step more advanced, but only available on Windows, is
the CryEngine:
http://en.wikipedia.org/wiki/Cryengine
http://mycryengine.com/
They also have a free version but again, no Python scripting
by default.


Another one to bring into attention may be Panda3D:
http://www.panda3d.org/
That has full Python support.

Don't forget that all these engines require you to build your
assets yourself, outside the engine.
This means that you have to go into a 3D program like Blender
to create characters, environments and creatures.

greets
Arno Beekman
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-17 Thread Neil Cerutti
On 2013-07-16, John Ladasky john_lada...@sbcglobal.net wrote:
 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.

One of the first satisfying programs I wrote as a child
autodidact on my Commodore 64 was a random name generator. There
are lots of workable strategies and the output can be fun.

Hint: Putting together random syllables turned out to be much
more fun than random consonants and vowels.

Markov chains are an advanced technique you could introduce, but
you'd need a huge list of names broken into syllables from
somewhere.

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-17 Thread Chris Angelico
On Wed, Jul 17, 2013 at 11:20 PM, Neil Cerutti ne...@norwich.edu wrote:
 Markov chains are an advanced technique you could introduce, but
 you'd need a huge list of names broken into syllables from
 somewhere.

You could use names broken into letters... or skip the notion of names
and just generate words. Lists of words are easy to come by (eg
/usr/share/dict/words on many Linux systems), so you can have some fun
without much effort.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-17 Thread Neil Cerutti
On 2013-07-17, Chris Angelico ros...@gmail.com wrote:
 On Wed, Jul 17, 2013 at 11:20 PM, Neil Cerutti ne...@norwich.edu wrote:
 Markov chains are an advanced technique you could introduce, but
 you'd need a huge list of names broken into syllables from
 somewhere.

 You could use names broken into letters... or skip the notion
 of names and just generate words. Lists of words are easy to
 come by (eg /usr/share/dict/words on many Linux systems), so
 you can have some fun without much effort.

That's true. Something like syllables should emerge from markov
chains of letters pretty well, depending on how long the the
chain is.

-- 
Neil Cerutti
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-17 Thread Chris Angelico
On Wed, Jul 17, 2013 at 11:55 PM, Neil Cerutti ne...@norwich.edu wrote:
 On 2013-07-17, Chris Angelico ros...@gmail.com wrote:
 On Wed, Jul 17, 2013 at 11:20 PM, Neil Cerutti ne...@norwich.edu wrote:
 Markov chains are an advanced technique you could introduce, but
 you'd need a huge list of names broken into syllables from
 somewhere.

 You could use names broken into letters... or skip the notion
 of names and just generate words. Lists of words are easy to
 come by (eg /usr/share/dict/words on many Linux systems), so
 you can have some fun without much effort.

 That's true. Something like syllables should emerge from markov
 chains of letters pretty well, depending on how long the the
 chain is.

I might have to hunt down my old Dissociated Press implementations,
they were fun fun fun.

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-17 Thread alex23

On 17/07/2013 11:29 PM, Chris Angelico wrote:

On Wed, Jul 17, 2013 at 11:20 PM, Neil Cerutti ne...@norwich.edu wrote:

Markov chains are an advanced technique you could introduce, but
you'd need a huge list of names broken into syllables from
somewhere.


You could use names broken into letters... or skip the notion of names
and just generate words. Lists of words are easy to come by (eg
/usr/share/dict/words on many Linux systems), so you can have some fun
without much effort.


I really wanted Dihedral to chime in here.

--
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-17 Thread Aseem Bansal
On Wednesday, July 17, 2013 4:13:45 AM UTC+5:30, John Ladasky wrote:
 Hi folks,
 
 
 
 No, I'm not asking for YOU to help ME with a Python homework assignment!
 
 
 
 Previously, I mentioned that I was starting to teach my son Python.  
 
 
 
 https://groups.google.com/d/msg/comp.lang.python/I7spp6iC3tw/8lxUXfrL-9gJ
 
 
 
 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.
 
 
 
 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).  
 
 
 
 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.
 
 
 
 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.
 
 
 
 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.
 
 
 
 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.
 
 
 
 Many thanks!

You can use PySide/QtCreator for getting a skeleton UI as easily as in case of 
Visual Studio. Converting it into .py files is also quite easy. Experiment a 
little for yourself in the beginning and you'll be able to make a simple 
Tic-Tac-Toe easily.

You can then decide how complex that becomes. Remember that computer's 
behaviour just might be the most complex thing in this whole thing. You can 
then take that out, explain the students that the game will work if you can 
make a function for this, explain the logic and that can be a really nice 
homework assignment.

I think that would be much better than just jumping off to a game engine 
sidetracking Python completely.

If you want to introduce them to programming in general in a fun way 
http://scratch.mit.edu/ might be much easier for making simple 2D games. It 
isn't Python but it is even better introduction to programming than Python(I am 
saying this even when I use Python everyday and I like it). Scratch isn't for 
long term but initially this could be their dose of excitement and introduction 
to the basics of programming. That would give you time to make simple games in 
PySide for taking them to Python gradually without killing their excitement.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-16 Thread David Hutto
You have to utilize a set curriculum to teach. Look at several books like
Dive Into Python, and such, then work with the student on an individualized
project for each one. For 3D you go with pygame and trig, or go with
Blender's python API
 or matplotlib. Just at first show the basic types of data, that is what
I'd suggest, like mutable immutable, lists tuples, and dictionaries to get
the hang of data containment that will probably move on to database
management, and loopiing/iterating through data, or updating a GUI.
Further teaching is moving on to what the student is trying to accomplish.

HTH


On Tue, Jul 16, 2013 at 6:43 PM, John Ladasky john_lada...@sbcglobal.netwrote:

 Hi folks,

 No, I'm not asking for YOU to help ME with a Python homework assignment!

 Previously, I mentioned that I was starting to teach my son Python.

 https://groups.google.com/d/msg/comp.lang.python/I7spp6iC3tw/8lxUXfrL-9gJ

 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.

 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).

 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.

 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.

 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.

 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.

 Many thanks!
 --
 http://mail.python.org/mailman/listinfo/python-list




-- 
Best Regards,
David Hutto
*CEO:* *http://www.hitwebdevelopment.com*
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-16 Thread Chris Angelico
On Wed, Jul 17, 2013 at 8:43 AM, John Ladasky
john_lada...@sbcglobal.net wrote:
 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.


The disillusionment of every novice programmer, I think. It starts out
as I want to learn programming and make a game. Real programming is
more like I can automate mundane tasks, which doesn't sound half as
exciting. But this is why I'm dubious of programming courses that
actually try to hold onto the let's make a game concept, because the
students are likely to get a bit of a let-down on realizing that it
really doesn't work that easily (this is a two-week course, at the
end of it I should have written the next insert name of popular game
for all my friends).

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-16 Thread Joel Goldstick
On Tue, Jul 16, 2013 at 8:40 PM, Chris Angelico ros...@gmail.com wrote:

 On Wed, Jul 17, 2013 at 8:43 AM, John Ladasky
 john_lada...@sbcglobal.net wrote:
  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.


 The disillusionment of every novice programmer, I think. It starts out
 as I want to learn programming and make a game. Real programming is
 more like I can automate mundane tasks, which doesn't sound half as
 exciting. But this is why I'm dubious of programming courses that
 actually try to hold onto the let's make a game concept, because the
 students are likely to get a bit of a let-down on realizing that it
 really doesn't work that easily (this is a two-week course, at the
 end of it I should have written the next insert name of popular game
 for all my friends).

 ChrisA
 --
 http://mail.python.org/mailman/listinfo/python-list


There is a book : http://inventwithpython.com/  *Invent Your Own Computer
Games with Python*
which claims to teach people to program games in python.  I haven't read
it, but it seems to be for beginning programmers.  Take a look.. Maybe it
would work for your kids.  It says its for kids younger than high school,
but it claims to be for all ages.  It does cover the turf your gang seems
most interested in.  Other positives -- its free online.  so no
investment.  And it introduces the concept of open source which is really a
key to a large segment of the whole software world, so that gives another
teaching moment

-- 
Joel Goldstick
http://joelgoldstick.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Homework help requested (not what you think!)

2013-07-16 Thread Chris Angelico
On Wed, Jul 17, 2013 at 10:53 AM, Joel Goldstick
joel.goldst...@gmail.com wrote:
 There is a book : http://inventwithpython.com/  Invent Your Own Computer
 Games with Python
 which claims to teach people to program games in python.  I haven't read it,
 but it seems to be for beginning programmers.  Take a look.. Maybe it would
 work for your kids.

Not my siblings specifically, but I've seen this happen elsewhere quite a bit.

Thing is, they still won't be making the next Call of Duty Black Ops,
or Alice: Madness Returns, or even the next Angry Birds. It's like
looking at the roads and how car manufacturers produce things that run
from here to Sydney, and then learning how to build a go-kart with
wooden wheels - strong disappointment in the scale of achievement.
Which is a pity, because that go-kart can be a lot of fun; the novice
programmer has to get past that disappointment and discover the other
fun aspects of coding, like the ability to improve your own
environment. (At work, one of my most useful oddments of code is a log
tailing system that runs on each of N remote servers and effectively
runs tail -F foo.log for each of M log files, tags the lines with
the hostname and log file name, and sends it to a single display on my
computer. Makes my job easier to the extent that I probably paid off
the time investment within a week, but it's hardly glamorous stuff.)

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list