473,748 Members | 2,793 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Teaching Python

Well, after years of teaching grade 12 students c++, I've decided to
make a switch to Python.

Why?

* interactive mode for learning
* less fussing with edit - compile - link - run - debug - edit -
compile - link - run -.....
* lots of modules
* I was getting tired of teaching c++! Bored teacher = bad instruction.
* thought about tcl/tk but it's just too different syntactically
(for me, not my students!) after so much time with languages like
c++/ada95/pascal/BASIC/Fortran, etc.
* it appears to be FREE (which in a high school environment is
mightily important) from both python.org or activestate.com . I think I
like activestate's ide (under Win98) a bit better than idle, but your
comments/suggestions?

I've decided to give John Zelle's new book a try as a student
textbook--it's as good an introductory CS book in any language I've
seen. I've done a couple of small projects with tkinter, like what I
see, and would like to introduct my students to it, although Zelle
doesn't make use of it in his text.

So, what pitfalls should I look out for in introducing Python to
students who have had a year of Visual BASIC?

Regards,

chackowsky dot nick at portal dot brandonsd dot mb dot ca <-- have the
spambots figured this one out yet?
Jul 18 '05 #1
20 2355
On Sat, 12 Jun 2004 03:22:23 +0000, Mediocre Person wrote:
Well, after years of teaching grade 12 students c++, I've decided to
make a switch to Python.

Why?

* interactive mode for learning
* less fussing with edit - compile - link - run - debug - edit -
compile - link - run -.....
* lots of modules
* I was getting tired of teaching c++! Bored teacher = bad instruction.
* thought about tcl/tk but it's just too different syntactically
(for me, not my students!) after so much time with languages like
c++/ada95/pascal/BASIC/Fortran, etc.
* it appears to be FREE (which in a high school environment is
mightily important) from both python.org or activestate.com . I think I
like activestate's ide (under Win98) a bit better than idle, but your
comments/suggestions?

I've decided to give John Zelle's new book a try as a student
textbook--it's as good an introductory CS book in any language I've
seen. I've done a couple of small projects with tkinter, like what I
see, and would like to introduct my students to it, although Zelle
doesn't make use of it in his text.

So, what pitfalls should I look out for in introducing Python to
students who have had a year of Visual BASIC?

Regards,

chackowsky dot nick at portal dot brandonsd dot mb dot ca <-- have the
spambots figured this one out yet?


Python is REALLY easy to learn. Your concern should probably be: "are they
going to learn this so quickly that I run out of material in a month?"
I've seen 6th graders learn to write relatively impressive,
object-oriented python programs within about 2 months.

I may not be a curriculum expert, but I would recommend replacing your
lower level visual basic class with a python class, and teaching something
far more advanced to 12th grade students. If you are getting bored with
c++, maybe switch to a functional language, like ocaml or haskell.

Python is a powerful language, and the simplicity and consistency of its
syntax enables developers to produce useful applications in very short
periods of time - but I question python's capacity to 'challenge' a
student that is already familiar with another object oriented programming
language. Python is an excellent introduction to object oriented ideas and
methodology, but if the students already know VB, they have already
learned object oriented programming, right?

If you do end up teaching python to advanced programming students, you
might want to look at David Mertz' 'charming python' articles. He deals
with a few rather sophisticated and interesting concepts, which managed to
spark a few insightful paradigm shifts (for me at least):
http://gnosis.cx/publish/tech_index_cp.html

-- SegPhault
Jul 18 '05 #2
Ryan Paul wrote:
methodology, but if the students already know VB, they have already
learned object oriented programming, right?


Now that is optimism :-)

Peter

Jul 18 '05 #3
Visual Basic has no inheritance; but it has a nice GUI IDE.

I'd look at wxPython as a freely available GUI IDE. SPE (Stanni's Python
Editor), which integrates wxPython and Blender (which performs visual magic)
would give your students some capabilties they don't have in VB.

For web stuff there are some very nice frameworks that are freely available,
such as Webware, which has a persistence layer, and Twisted, which can do so
many things it is eponymous. You would easily do a year of web stuff,
including ZOPE (Content Management) and Plone (visually acceptable Content
Management and user-friendlier Content Management) on top of ZOPE, after
they have Python down.

Hank Fay

--

"Mediocre Person" <me************ *@hotmail.com> wrote in message
news:51******** *************** *******@news.te ranews.com...
Well, after years of teaching grade 12 students c++, I've decided to
make a switch to Python.

Why?

* interactive mode for learning
* less fussing with edit - compile - link - run - debug - edit -
compile - link - run -.....
* lots of modules
* I was getting tired of teaching c++! Bored teacher = bad instruction. * thought about tcl/tk but it's just too different syntactically
(for me, not my students!) after so much time with languages like
c++/ada95/pascal/BASIC/Fortran, etc.
* it appears to be FREE (which in a high school environment is
mightily important) from both python.org or activestate.com . I think I
like activestate's ide (under Win98) a bit better than idle, but your
comments/suggestions?

I've decided to give John Zelle's new book a try as a student
textbook--it's as good an introductory CS book in any language I've
seen. I've done a couple of small projects with tkinter, like what I
see, and would like to introduct my students to it, although Zelle
doesn't make use of it in his text.

So, what pitfalls should I look out for in introducing Python to
students who have had a year of Visual BASIC?

Regards,

chackowsky dot nick at portal dot brandonsd dot mb dot ca <-- have the
spambots figured this one out yet?

Jul 18 '05 #4
Python is an excellent introduction to object oriented ideas and
methodology, but if the students already know VB, they have already
learned object oriented programming, right? Well, there's OOP and then there's OOP, right? The first year students
have learned to _use_ pre-defined objects, but not design and create
classes.

You state, "Python is REALLY easy to learn. Your concern should probably
be: "are they going to learn this so quickly that I run out of material
in a month?" I've seen 6th graders learn to write relatively impressive,
object-oriented python programs within about 2 months." Can you give me
some references to this, such as samples of student work? I would like
to see what grade 6 students can do in two months!

I agree that the syntax of Python makes it is easy to learn. However, I
think I've got a pretty good imagination where material is concerned!
There are excellent tie-ins to their mathematics, physics, chemistry,
and biology curricula. For instance, I recently came across the concept
of partitions in number theory, and computing all the partitions of an
integer is a dilly of a pickle of a problem!

And, of course, it's really not about the language, in the end, after
all, but what you can learn to do with it. In which case, you say,
"AHA--so what was wrong with c++???" In a word, nothing. And I'll *miss*
all the lovely memory management lessons we did to develop our own
vector and list classes. In the end, I think the change is mostly for me!

I know nothing about ocaml or haskell, but I'll be sure to research them
this summer, so thanks for the tip!

Nick.

If you do end up teaching python to advanced programming students, you
might want to look at David Mertz' 'charming python' articles. He deals
with a few rather sophisticated and interesting concepts, which managed to
spark a few insightful paradigm shifts (for me at least):
http://gnosis.cx/publish/tech_index_cp.html

-- SegPhault

Jul 18 '05 #5
On Sat, 12 Jun 2004 14:45:21 GMT, Mediocre Person
<me************ *@hotmail.com> wrote:
You state, "Python is REALLY easy to learn. Your concern should probably
be: "are they going to learn this so quickly that I run out of material
in a month?" I've seen 6th graders learn to write relatively impressive,
object-oriented python programs within about 2 months." Can you give me
some references to this, such as samples of student work? I would like
to see what grade 6 students can do in two months!

Me too.

My IQ problem might be more dramatic than I thought. It took me
longer than that to sense which way was up, and I was coming to the
effort with good energy and a good deal of non-programming computer
background.

"REALLY easy" sounds great, but I think the idea that it is in fact so
can work, in the end, to discourage those of us who don't find it so.

"REALLY worthwhile", perhaps.
I agree that the syntax of Python makes it is easy to learn. However, I
think I've got a pretty good imagination where material is concerned!
There are excellent tie-ins to their mathematics, physics, chemistry,
and biology curricula. For instance, I recently came across the concept
of partitions in number theory, and computing all the partitions of an
integer is a dilly of a pickle of a problem!


I strongly agree that it is these tie-ins that make the effort to
extend programming literacy more widely "REALLY worthwhile".

And happen to believe that Python is an excellant way to go.

Art
Jul 18 '05 #6
Mediocre Person wrote:
So, what pitfalls should I look out for in introducing Python to
students who have had a year of Visual BASIC?


I was a Visual Basic programmer for a few months in 2002. It took me
almost a year to recover. It is vaguely object-oriented, but its
definition of objects are horribly warped; going to a genuine OO
language after VB is a complete nightmare.

If at all possible, I would recommend changing the Visual Basic class to
RealBASIC (http://realbasic.com/). It's not perfect, but it has proper
OO support, and would make the transition to Python much easier. Even
better would be teaching basic Python to the VB class and more advanced
Python to the 12th graders; Python's biggest strength is allowing
beginners to use simple OO or even procedural techniques without ever
noticing the advanced stuff like list comprehensions and metaclasses.
Jul 18 '05 #7
Leif K-Brooks wrote:
Mediocre Person wrote:
So, what pitfalls should I look out for in introducing Python to
students who have had a year of Visual BASIC?

If at all possible, I would recommend changing the Visual Basic class to
RealBASIC (http://realbasic.com/). It's not perfect, but it has proper
OO support, and would make the transition to Python much easier. Even
better would be teaching basic Python to the VB class and more advanced
Python to the 12th graders; Using Python for the early class is not out of the question--but I'd
want to find an environment that mimics (or improves upon) VB's
brilliantly (forgive me) easy model of designing the gui and then
programming responses to events. Someone mentioned SPE, which I haven't
seen in action yet.

Python's biggest strength is allowing beginners to use simple OO or even procedural techniques without ever
noticing the advanced stuff like list comprehensions and metaclasses.

Jul 18 '05 #8
On Sat, 12 Jun 2004 14:45:21 +0000, Mediocre Person wrote:
Well, there's OOP and then there's OOP, right? The first year students
have learned to _use_ pre-defined objects, but not design and create
classes.
That makes sense. If they haven't learned to create objects yet, then
python is probably the most practical way to teach it.
Can you give me some references to this, such as samples of student
work? I would like to see what grade 6 students can do in two months!
This was part of a special program at my former junior high school. They
offered a single semester computer programming class as an 'elective'.
Thematically, the class focused on using object oriented idioms to solve
problems. Most of the assignments were designed to emphasize the power and
flexibility of OO.

I think that the immediate and consistent focus on OO was part of what
made them capable of doing so much, so quickly. Towards the end of the
semester, they were working in groups, writing games. Their devotion to
their work was somewhat inspiring. Many of them put in many extra hours to
improve their work, and they developed a sort of competitive enthusiasm,
challenging each other with small problems and comparing their solutions.

The instructor of that programming class is doing a summer program with
some of the students that will involve putting together a web site about
the programming class that will showcase some of the student programs. He
wants to teach them how to use mod_python. As soon as he gives me the
address, i'll be sure to post it on a.l.p, as i'm sure there are many here
who would be interested.
I agree that the syntax of Python makes it is easy to learn. However, I
think I've got a pretty good imagination where material is concerned!
There are excellent tie-ins to their mathematics, physics, chemistry,
and biology curricula. For instance, I recently came across the concept
of partitions in number theory, and computing all the partitions of an
integer is a dilly of a pickle of a problem!
This is obviously why I'm not a teacher and you are. =} Sounds like you
have some creative ways to tie it into general curriculum.
And, of course, it's really not about the language, in the end, after
all, but what you can learn to do with it. In which case, you say,
"AHA--so what was wrong with c++???" In a word, nothing. And I'll *miss*
all the lovely memory management lessons we did to develop our own
vector and list classes.
I'd never ask "what is wrong with c++", because I'm already painfully
aware of the answer: almost everything. I completely understand the
motivation for moving away from it. When I write c++ I spend more time
thinking about how to deal with the language's severe flaws, rather than
how to get the job done.
I know nothing about ocaml or haskell, but I'll be sure to research them
this summer, so thanks for the tip!


Really, it depends on what your goals are, and what you believe the
capacity of the students to be. If you are introducing object oriented
programming, python is a good choice, especially if the students have
never been exposed to anything like python before.

I know that if, in my senior year of high school, I had seen a python
class offered, I would probably have laughed at the prospect, and taken
something more challenging.

OCaml is also free, and it also provides an interactive top-level. It has
automatic memory management, and type inference. It is statically typed,
and that makes it significantly more challenging to use effectively. OCaml
has some interesting features, and learning to use them well requires a
lot of thought, and careful attention to detail. Some aspects altered the
way I think about programming logic (particularly: pattern matching,
recursive types, stateless OO, and parametric polymorphism.)

Based on what you have said, it sounds like python may be the best choice
for your students at this point. I live in california, and the schools in
my immediate vicinity all have very strong (well funded) tech programs.
There are computers in most of the classrooms, and a simple computer
science class is required for all students at the junior high, so the
level of the students here is probably not indicative of students
everywhere, and I hadnt really stopped to think about that before I made
my post last night.

As far as teaching python is concerned, the Edu-Sig is probably the best
place for you to start.

http://python.org/sigs/edu-sig/

You find this specific link insightful, it talks about python at a high
school level:
http://python.org/workshops/2000-01/...ner/pyYHS.html

Best of luck!

--segphault

Jul 18 '05 #9
In addition, for your advanced class you could take a look at Leo, part of
the Literate programming effort. Think of a outliner, where your code
resides under the nodes of the tree. For the data-oriented aspect of the
application, you can put the data-oriented Use Cases as the tree, and put
the code that implements each use case right there. Leo does much more, but
it's a tool that will open your students' minds, and probably spoil them
for the future. <s>

Hank Fay

--

"Mediocre Person" <me************ *@hotmail.com> wrote in message
news:50******** *************** *******@news.te ranews.com...
Leif K-Brooks wrote:
Mediocre Person wrote:
So, what pitfalls should I look out for in introducing Python to
students who have had a year of Visual BASIC?


If at all possible, I would recommend changing the Visual Basic class to
RealBASIC (http://realbasic.com/). It's not perfect, but it has proper
OO support, and would make the transition to Python much easier. Even
better would be teaching basic Python to the VB class and more advanced
Python to the 12th graders;

Using Python for the early class is not out of the question--but I'd
want to find an environment that mimics (or improves upon) VB's
brilliantly (forgive me) easy model of designing the gui and then
programming responses to events. Someone mentioned SPE, which I haven't
seen in action yet.

Python's biggest strength is allowing
beginners to use simple OO or even procedural techniques without ever
noticing the advanced stuff like list comprehensions and metaclasses.

Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1990
by: Kyler Laird | last post by:
I've been using Pyrex to get me through the Computer Vision class I'm taking this semester http://shay.ecn.purdue.edu/~ece661/ by dealing with the requirement that all programming assignments be submitted as C code. That's worked *very* well for me and I'm thankful that I don't have to deal with writing the assignments in C from scratch. (I am sure that it would degrade my understanding of the course material.) Now I've found another...
14
1827
by: Gabriel Zachmann | last post by:
This post is not strictly Python-specific, still I would like to learn other university teachers' opinion. Currently, I'm teaching "introduction to OO programming" at the undergrad level. My syllabus this semester consists of a bit of Python (as an example of a scripting language) and C++ (as an example of a compiled language). With C++, I go all the way up to meta-programming. My question now is: do you think I should switch over to...
822
29612
by: Turamnvia Suouriviaskimatta | last post by:
I 'm following various posting in "comp.lang.ada, comp.lang.c++ , comp.realtime, comp.software-eng" groups regarding selection of a programming language of C, C++ or Ada for safety critical real-time applications. The majority of expert/people recommend Ada for safety critical real-time applications. I've many years of experience in C/C++ (and Delphi) but no Ada knowledge. May I ask if it is too difficult to move from C/C++ to Ada?...
16
4376
by: msnews.microsoft.com | last post by:
I am teaching C# to my 11 year old child. One challenge is that all the C# books I own and that I have seen in bookstores are full of language that is not easily comprehended by a student at that age. Can anyone recommend books (or perhaps websites) tuned for younger audiences? BTW, its amazing how fast a student can absorb this kind of information at that age. Lucky them! Thanks, Bruce
8
3666
by: Kirill Simonov | last post by:
Hi, Could anyone suggest me a simple IDE suitable for teaching Python as a first programming language to high school students? It is necessary that it has a good support for input/output in Cyrillic. Unfortunately, most IDEs I tried failed miserably in this respect. My test was simple: I've run the code name = raw_input("What's your name? ") # written in Russian print "Hello, %s!" % name # in Russian as well
0
1152
by: Wingware | last post by:
Hi, We're pleased to announce the first public beta release of Wing IDE 101, a free scaled back edition of Wing IDE that was designed for teaching introductory programming courses. We are releasing Wing IDE 101 to the general public in the hopes that it may help others teach with or learn Python. Wingware also offers educational pricing for Wing IDE Professional, including steep discounts for class room use. If you are interested in...
35
1550
by: Ben Crowell | last post by:
I teach physics at a community college, and ca. 2000 I experimented with using python as a teaching tool. The point wasn't to teach programming per se, but simply to give students a way of solving problems numerically when there isn't any way to get a closed-form solution using algebra or calculus. Other physics teachers have done similar things using spreadsheets, but personally I think that's a horrendous approach -- partly because...
0
8991
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9541
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8242
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4602
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.