Python in High School

S

sprad

I'm a high school computer teacher, and I'm starting a series of
programming courses next year (disguised as "game development" classes
to capture more interest). The first year will be a gentle
introduction to programming, leading to two more years of advanced
topics.

I was initially thinking about doing the first year in Flash/
ActionScript, and the later years in Java. My reasoning is that Flash
has the advantage of giving a quick payoff to keep the students
interested while I sneak in some OOP concepts through ActionScript.
Once they've gotten a decent grounding there, they move on to Java for
some more heavy-duty programming.

I've never used Python, but I keep hearing enough good stuff about it
to make me curious.

So -- would Python be a good fit for these classes? Could it equal
Java as the later heavy-duty language? Does it have enough quickly-
accessible sparklies to unseat Flash?

I want to believe. Evangelize away.
 
M

mdomans

Python needs no evangelizing but I can tell you that it is a powerfull
tool. I prefer to think that flash is rather visualization tool than
programing language, and java needs a lot of typing and a lot of
reading. On the other hand python is simple to read and write, can be
debuged easily, is intuitive and saves a lot of time. It also supports
batteries included policy and you can't get more OO than python.
 
B

Bruno Desthuilliers

sprad a écrit :
I'm a high school computer teacher, and I'm starting a series of
programming courses next year (disguised as "game development" classes
to capture more interest). The first year will be a gentle
introduction to programming, leading to two more years of advanced
topics.

I was initially thinking about doing the first year in Flash/
ActionScript, and the later years in Java. My reasoning is that Flash
has the advantage of giving a quick payoff to keep the students
interested while I sneak in some OOP concepts through ActionScript.
Once they've gotten a decent grounding there, they move on to Java for
some more heavy-duty programming.

I've never used Python, but I keep hearing enough good stuff about it
to make me curious.

So -- would Python be a good fit for these classes?

IMHO, yes, definitively - except that it won't introduce concepts like
static typing and primitive types, since it's dynamically typed and 100%
object. OTHO, it'll let you introduce quite a lot of more advanced
topics (operator overloading, metaclasses, higher-order functions,
closures, partial application etc) that you're less likely to grasp
using Java.
Could it equal
Java as the later heavy-duty language?

If you mean "is it possible to use Python to write real-world,
non-trivial applications", then the answer is obviously yes. Python's
use range from Q&D admin script to full-blown web application server
including vector graphic GUI apps, scientific data analysis and plotting
and game developpment and/or scripting.
Does it have enough quickly-
accessible sparklies to unseat Flash?

Since you plan to lure poor schoolboys in by pretending to teach them
game programming, you may want to have a look at pygame:

http://www.pygame.org/news.html
I want to believe. Evangelize away.

"Then I saw Pygame, now I'm a believer".... !-)
 
S

sprad

Python needs no evangelizing but I can tell you that it is a powerfull
tool. I prefer to think that flash is rather visualization tool than
programing language, and java needs a lot of typing and a lot of
reading. On the other hand python is simple to read and write, can be
debuged easily, is intuitive and saves a lot of time. It also supports
batteries included policy and you can't get more OO than python.

One advantage of Flash is that we can have something moving on the
screen from day one, and add code to it piece by piece for things like
keyboard or mouse control, more and more complex physics, etc. Is
there an equivalent project in Python?
 
B

Bruno Desthuilliers

sprad a écrit :
One advantage of Flash is that we can have something moving on the
screen from day one, and add code to it piece by piece for things like
keyboard or mouse control, more and more complex physics, etc. Is
there an equivalent project in Python?

see my other answer in this thread.
 
P

Paddy

I'm a high school computer teacher, and I'm starting a series of
programming courses next year (disguised as "game development" classes
to capture more interest). The first year will be a gentle
introduction to programming, leading to two more years of advanced
topics.

I was initially thinking about doing the first year in Flash/
ActionScript, and the later years in Java. My reasoning is that Flash
has the advantage of giving a quick payoff to keep the students
interested while I sneak in some OOP concepts through ActionScript.
Once they've gotten a decent grounding there, they move on to Java for
some more heavy-duty programming.

I've never used Python, but I keep hearing enough good stuff about it
to make me curious.

So -- would Python be a good fit for these classes? Could it equal
Java as the later heavy-duty language? Does it have enough quickly-
accessible sparklies to unseat Flash?

I want to believe. Evangelize away.

How proficient are you in Flash/Actionscript?
I suggest you try out Python/Pygame and extrapolate from that,
given your available time, would you be proficient enough to teach
it?

- Paddy.
 
L

Laurent Pointal

Le Tue, 01 Apr 2008 12:35:46 -0700, Paddy a écrit :
On Apr 1, 6:27 pm, sprad <[email protected]> wrote:

How proficient are you in Flash/Actionscript? I suggest you try out
Python/Pygame and extrapolate from that, given your available time,
would you be proficient enough to teach it?

And if you want to do easy and simple 3D graphics programming, look at
VPython

http://www.vpython.org/
 
A

André

sprad a écrit :







IMHO, yes, definitively - except that it won't introduce concepts like
static typing and primitive types, since it's dynamically typed and 100%
object. OTHO, it'll let you introduce quite a lot of more advanced
topics (operator overloading, metaclasses, higher-order functions,
closures, partial application etc) that you're less likely to grasp
using Java.


If you mean "is it possible to use Python to write real-world,
non-trivial applications", then the answer is obviously yes. Python's
use range from Q&D admin script to full-blown web application server
including vector graphic GUI apps, scientific data analysis and plotting
and game developpment and/or scripting.


Since you plan to lure poor schoolboys in by pretending to teach them
game programming, you may want to have a look at pygame:

http://www.pygame.org/news.html


"Then I saw Pygame, now I'm a believer".... !-)

There is also pyglet which is quite impressive and easy to use.

André
 
B

Basilisk96

I'm a high school computer teacher, and I'm starting a series of
programming courses next year (disguised as "game development" classes
to capture more interest). The first year will be a gentle
introduction to programming, leading to two more years of advanced
topics.

I was initially thinking about doing the first year in Flash/
ActionScript, and the later years in Java. My reasoning is that Flash
has the advantage of giving a quick payoff to keep the students
interested while I sneak in some OOP concepts through ActionScript.
Once they've gotten a decent grounding there, they move on to Java for
some more heavy-duty programming.

I've never used Python, but I keep hearing enough good stuff about it
to make me curious.

So -- would Python be a good fit for these classes? Could it equal
Java as the later heavy-duty language? Does it have enough quickly-
accessible sparklies to unseat Flash?

I want to believe. Evangelize away.

I highly recommend that you read the introduction chapters in two of
the books on this site: http://www.greenteapress.com/

The first book is called "How To Think Like a Computer Scientist:
Learning with Python".
The second book is a follow-up edition to that one, and is called "How
To Think Like a (Python) Programmer".

All of the books there are written by school teachers, so I think you
will find valuable insight there. The same books also have a Java and
a C++ flavor. All are free downloads.

My very first serious look into Python came from this series, and I
thoroughly enjoyed learning the basics. I think the text was so
successful for me because the content is well-connected.

As far as which language to choose - well, you can make the choice
yourself after reading at least the introductions of all the books. If
you do decide on Python, there is a library called "pygame" that may
achieve your visual game programming goals.

Enjoy!
-Basilisk96
 
G

Gabriel Rossetti

sprad said:
I'm a high school computer teacher, and I'm starting a series of
programming courses next year (disguised as "game development" classes
to capture more interest). The first year will be a gentle
introduction to programming, leading to two more years of advanced
topics.

I was initially thinking about doing the first year in Flash/
ActionScript, and the later years in Java. My reasoning is that Flash
has the advantage of giving a quick payoff to keep the students
interested while I sneak in some OOP concepts through ActionScript.
Once they've gotten a decent grounding there, they move on to Java for
some more heavy-duty programming.

I've never used Python, but I keep hearing enough good stuff about it
to make me curious.

So -- would Python be a good fit for these classes? Could it equal
Java as the later heavy-duty language? Does it have enough quickly-
accessible sparklies to unseat Flash?

I want to believe. Evangelize away.
I think it's a good idea (to use python), Mr. Swinnen, a high school
teacher in Belgium wrote a book out of the course that he created for
his programming class : Apprendre à programmer avec Python, 2e édition,
O'Reilly. His course was originally a translation of Allen B. Downey's
Open-source book (see : http://www.greenteapress.com/free_books.html).

I think this is proof of concept, no?

Gabriel
 
J

Jan Claeys

Op Tue, 01 Apr 2008 10:27:18 -0700, schreef sprad:
I'm a high school computer teacher, and I'm starting a series of
programming courses next year (disguised as "game development" classes
to capture more interest). The first year will be a gentle introduction
to programming, leading to two more years of advanced topics.
[...]
So -- would Python be a good fit for these classes?

There are at least 3 books about game programming in python:
<http://www.amazon.com/Game-Programming-Line-Express-Learning/dp/0470068221>
<http://www.amazon.com/Beginning-Game-Development-Python-Pygame/dp/1590598725>
<http://www.amazon.com/Game-Programming-Python-Development/dp/1584502584>
 
J

John Henry

One advantage of Flash is that we can have something moving on the
screen from day one, and add code to it piece by piece for things like
keyboard or mouse control, more and more complex physics, etc. Is
there an equivalent project in Python?

I downloaded the "How to Think Like a Python Programmer" book and read
it. I think it's a fine reference book for the purpose you
indicated.

Here's my 2 cents on the subject.

I had been a volunteer mentor to my son's middle school robotic team
for several years and I have some experiences, therefore, in how kids
react to "programming". Granted, high school kids are "bigger kids" -
but they are kids nevertheless.

Last summer, I experimented teaching my own kid Python. He was in 7th
grade going onto 8th grade. He was the main goto person for the
robotic team and had no trouble learning the common applications such
as the Microsoft Office suite, and had some experience in ICONic
programming (Lego Mindstorm). So, I tried to see what would happen if
he tries to learn Python - using somewhat similar approach you are
taking: start with something visually appealing on day one. Instead
of Flash, I used Pythoncard - a no-brainer Python GUI construction
toolkit. He was really excited seeing how easy it was to have tic-tae-
toe type program up so easily (we are taking minutes - not hours) and
was very interested and motivated to continue. So far so good.
However, once I start teaching him variables, expressions, loops, and
what not, I found that (by surprise) he had great difficulties
catching on. Not soon after that, we had to quit.

We - as adults - take many things for granted and sometimes don't
remember, or don't understand how kids learn. My experience tells me
that in order to teach today's video game generation of kids, the
approach really has to be entirely visual. After I abandoned my
attempt to teach my kid Python, I started them on Robolab - a
simplified version of LabView and to my delight, they were able to
cook up a few simple programs (like fibonacci series and so forth)
without too much effort - although my own kid had some minor trouble
understanding the concept of a container (LabView's version of a
variable).

I don't know if you have access to LabView or Robolab or similar
packages but if you do, I would highly recommend those. LabView is
every bit as powerful, full-featured, and "real-life" as many of the
other languages and I believe that kids will have a much easier time
learning computer programming with it.

And you are going to teach them Java? Oh, please don't. Let the
colleges torture them. :=)
 
S

Stef Mientki

John said:
I downloaded the "How to Think Like a Python Programmer" book and read
it. I think it's a fine reference book for the purpose you
indicated.

Here's my 2 cents on the subject.

I had been a volunteer mentor to my son's middle school robotic team
for several years and I have some experiences, therefore, in how kids
react to "programming". Granted, high school kids are "bigger kids" -
but they are kids nevertheless.

Last summer, I experimented teaching my own kid Python. He was in 7th
grade going onto 8th grade. He was the main goto person for the
robotic team and had no trouble learning the common applications such
as the Microsoft Office suite, and had some experience in ICONic
programming (Lego Mindstorm). So, I tried to see what would happen if
he tries to learn Python - using somewhat similar approach you are
taking: start with something visually appealing on day one. Instead
of Flash, I used Pythoncard - a no-brainer Python GUI construction
toolkit. He was really excited seeing how easy it was to have tic-tae-
toe type program up so easily (we are taking minutes - not hours) and
was very interested and motivated to continue. So far so good.
However, once I start teaching him variables, expressions, loops, and
what not, I found that (by surprise) he had great difficulties
catching on. Not soon after that, we had to quit.

We - as adults - take many things for granted and sometimes don't
remember, or don't understand how kids learn. My experience tells me
that in order to teach today's video game generation of kids, the
approach really has to be entirely visual. After I abandoned my
attempt to teach my kid Python, I started them on Robolab - a
simplified version of LabView and to my delight, they were able to
cook up a few simple programs (like fibonacci series and so forth)
without too much effort - although my own kid had some minor trouble
understanding the concept of a container (LabView's version of a
variable).

I don't know if you have access to LabView or Robolab or similar
packages but if you do, I would highly recommend those. LabView is
every bit as powerful, full-featured, and "real-life" as many of the
other languages and I believe that kids will have a much easier time
learning computer programming with it.
Well I doubt it's the visual environment that makes it more easy,
color, shape and position can give some extra information though.
I think apriori domain knowledge and flattness of information are of far
more importance.
The first issue is covered quit well by Robolab / Labview,
but the second issue certainly is not.
I'm right now working on a Labview like editor in Python,
which does obey the demand for flatness of information.
The first results can be seen here:
http://oase.uci.kun.nl/~mientki/data_www/pylab_works/pw_animations_screenshots.html

cheers,
Stef Mientki
 
D

Dan Upton

Op Tue, 01 Apr 2008 10:27:18 -0700, schreef sprad:

I'm a high school computer teacher, and I'm starting a series of
programming courses next year (disguised as "game development" classes
to capture more interest). The first year will be a gentle introduction
to programming, leading to two more years of advanced topics.
[...]
So -- would Python be a good fit for these classes?

There are at least 3 books about game programming in python:
<http://www.amazon.com/Game-Programming-Line-Express-Learning/dp/0470068221>
<http://www.amazon.com/Beginning-Game-Development-Python-Pygame/dp/1590598725>
<http://www.amazon.com/Game-Programming-Python-Development/dp/1584502584>

This was the book I first bought when I started thinking about
learning Python, and it includes some pygame projects. It uses all
game programming-based concepts for teaching, although many of them
are text-based and it only introduces pygame toward the end.

http://www.amazon.com/Python-Progra...=sr_1_6?ie=UTF8&s=books&qid=1207169620&sr=1-6

I might add, you might do a disservice to students by starting them
with flashy graphics-based programming--IIRC, that was actually a part
of the complaints a couple months ago about why "Java schools" were
failing to turn out competent computer scientists: they focus too
heavily on something that looks good and end up missing the underlying
concepts. Not that you'd ever do such a thing, I'm sure ;) But my
intro CS professor in undergrad had us do two of the projects from our
textbook that involved GUI programming, then quickly dropped it,
partly because we were spending so much time of the implementation of
the projects 1) figuring out how to set up the GUI in Swing, and 2)
not really understanding why we're typing all this stuff to create
buttons and text fields.

And you are going to teach them Java? Oh, please don't. Let the
colleges torture them. :=)

Side rant: I think Java's just fine, as long as it's taught properly.
I'd done a little bit of C and C++ programming when I was in high
school, trying to teach myself from a book, but I never really got
pointers or objects. Going back to it after Java, it made so much
more sense, even though people will tell you "Java doesn't make you
learn about pointers."
 
J

John Henry

I downloaded the "How to Think Like a Python Programmer" book and read
it. I think it's a fine reference book for the purpose you
indicated.

Here's my 2 cents on the subject.

I had been a volunteer mentor to my son's middle school robotic team
for several years and I have some experiences, therefore, in how kids
react to "programming". Granted, high school kids are "bigger kids" -
but they are kids nevertheless.

Last summer, I experimented teaching my own kid Python. He was in 7th
grade going onto 8th grade. He was the main goto person for the
robotic team and had no trouble learning the common applications such
as the Microsoft Office suite, and had some experience in ICONic
programming (Lego Mindstorm). So, I tried to see what would happen if
he tries to learn Python - using somewhat similar approach you are
taking: start with something visually appealing on day one. Instead
of Flash, I used Pythoncard - a no-brainer Python GUI construction
toolkit. He was really excited seeing how easy it was to have tic-tae-
toe type program up so easily (we are taking minutes - not hours) and
was very interested and motivated to continue. So far so good.
However, once I start teaching him variables, expressions, loops, and
what not, I found that (by surprise) he had great difficulties
catching on. Not soon after that, we had to quit.

We - as adults - take many things for granted and sometimes don't
remember, or don't understand how kids learn. My experience tells me
that in order to teach today's video game generation of kids, the
approach really has to be entirely visual. After I abandoned my
attempt to teach my kid Python, I started them on Robolab - a
simplified version of LabView and to my delight, they were able to
cook up a few simple programs (like fibonacci series and so forth)
without too much effort - although my own kid had some minor trouble
understanding the concept of a container (LabView's version of a
variable).

I don't know if you have access to LabView or Robolab or similar
packages but if you do, I would highly recommend those. LabView is
every bit as powerful, full-featured, and "real-life" as many of the
other languages and I believe that kids will have a much easier time
learning computer programming with it.

And you are going to teach them Java? Oh, please don't. Let the
colleges torture them. :=)

BTW: I successfully taught them to program in machine language. We
used lego parts to construct a psudo-turing machine with a 33 bit
register, and used Lego Mindstorm to do the programming. It would
read the position of the "register" (input), perform an operation, and
outputs the answer. To do that, they have to break down a set of 2
numbers into binary form (via pencil and paper), set the flip switches
(constructed w lego parts), hit a touch sensor to begin the
operation. The robot would then read the position of the flip
switches (via light sensor), interpret the first bit (operator: add or
subtract), then interpret the next 32 bits as 2 numbers (I only
allowed them to use addition, shift, and loops in their program), do
the operation internally in decimal, convert the answer to binary, and
"display" the result (output) using those switches. They take the
result - convert it back to decimal (via pencil and papger) and see
that the answer is indeed correct. Wow! My machine can add and
subtract!!!

They did all these without knowing that they learned the very basis of
all computer programming - they just had lots of fun doing it.
 
J

John Henry

Well I doubt it's the visual environment that makes it more easy,
color, shape and position can give some extra information though.
I think apriori domain knowledge and flattness of information are of far
more importance.
The first issue is covered quit well by Robolab / Labview,
but the second issue certainly is not.
I'm right now working on a Labview like editor in Python,
which does obey the demand for flatness of information.
The first results can be seen here:http://oase.uci.kun.nl/~mientki/data_www/pylab_works/pw_animations_sc...

cheers,
Stef Mientki

What do you mean by flatness of information?
 
J

Jan Claeys

Op Wed, 02 Apr 2008 17:02:45 -0400, schreef Dan Upton:
Side rant: I think Java's just fine, as long as it's taught properly.
I'd done a little bit of C and C++ programming when I was in high
school, trying to teach myself from a book, but I never really got
pointers or objects. Going back to it after Java, it made so much more
sense, even though people will tell you "Java doesn't make you learn
about pointers."

I learned about pointers while learning Pascal (and later embedded
assembler) using Borland's tools.

Later I learned C (and even later C++), and I've always been wondering why
those languages were making simple things so complicated...
 
N

Nick J Chackowsky

sprad said:
I'm a high school computer teacher, and I'm starting a series of
programming courses next year (disguised as "game development" classes
to capture more interest). The first year will be a gentle
introduction to programming, leading to two more years of advanced
topics.

I have taught high school comp. sci. for a number of years, using
Pascal, Ada, C++, Visual Basic, and Python as languages. Python has, in
my opinion, given the students the best opportunity to really discover
what programming and computer science are all about. Very high level
code without the enormous learning curve for the "extras", plus easy
debugging and useful error messages make it ideal.

class Example {
// your program begins with a call to main()
public static void main(String args[]){
System.out.println("this is a simple Java program");
}
}

vs

print ("This is a simple Python program.")

Once a student has a grasp of Python and programming, he/she is better
prepared to understand _why_ Java and C++ _need_ all the declarations,
decorations, and specifications, and why they might be useful. But it's
sure nice to start doing real programming in such a simple, elegant
environment.

Nick.
 
B

Bruno Desthuilliers

Jan Claeys a écrit :
(snip)
I learned about pointers while learning Pascal (and later embedded
assembler) using Borland's tools.

Later I learned C (and even later C++), and I've always been wondering why
those languages were making simple things so complicated...

Similar pattern here : I had difficulties grasping pointers in C, then
learned them in Pascal and got enlightned. Then I was able to use them
correctly in C.
 
S

Stef Mientki

What do you mean by flatness of information?
What I mean is something like; all the information at a certain
abstraction level is visible on one screen or one piece of paper,
and not is available through multiple screen / multiple right-clicks
etc. A wizard in general is an example of strong non-flatness of
information (try adding a mail-account in Thunderbird, this could
easily be put on 1 page, which clearly would give a much better overview).

cheers,
Stef
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top