Re: [Edu-sig] suggestions about turtle.py
Hi all, some years ago I had to teach using a macintosh lab: due to some problems with Tk on mac there was no Idle (and no turtle.py IIRC). That was when I realized how useful the batteries included Idle (-n) together with the old turle.py really was for me. It is my standard graphics package. I once used it to demonstrate the adding up of arrows for physics (arrows representing sine-waves with different phases like from a grating): you could script this from idle and look at the different resulting amplitudes for different angles (arrow spirals curling up or not). Physicists will know what I mean. A Turtle was exactly the right tool to do this. As a quick way to introduce loops etc. with visual feedback the turtle has always worked out well in my (school) classes: ages 15-17. I also like it that the old turtle.py lets you decide if you want to do it procedural (module-level functions) or OO-like. And if you want to hide the things you don't need or rename methods etc. just implement an appropriate intermediate module with your favorite settings and put it in the pythonpath for the class to import: # ooTurtle.py from turtle import Pen class Turtle: def __init__(self, mycolor='black'): self._pen=Pen() self.color(mycolor) def color(self,*args): self._pen.color(*args) ... So dir(Turtle) will only show the methods you explicitly put in there. And you can have the names that you want. Gregor Lingl wrote: In the meantime (and looking forward to preparing a second edition of my book) I've been working on a new turtle graphics module - I named it Xturtle.py. BTW, I like your book. 1) I submit my Xturtle.py module along with a set of 10+ demo samples. I've zipped them into a package and I'll try to submit them as an attachment in a separate follow up posting. Great stuff. Moreover let's remember, that turtle graphics was invented to teach programming to very young people. So let's do it in a way, that interesting things can easily be done with it. Still: young could be quite old. I still like to play around with turtles... (a) How about compatibility? Should every old turtle program be executable with the amended module? Remind that there is some strange behaviour in the old module concerning fill. IMO it should be discussed if the radians-mode in turtle.py should be retained. (Is it really useful?) As I could rename methods (i.e. to German) anyway, backwards compatibility isn't that important. I just need to find the things I need. Fixing things to go with a new turtle-module shouldn't be difficult. But there should always be an Out-of-the-Box turtle in the standard installation. (c) I'd propose to add a sort of TurtleCanvas class to the turtle module. Seems reasonable to me. Just my 2c. Cheers Christian ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16
On 2/28/06, Toby Donaldson [EMAIL PROTECTED] wrote: As I pointed out in my message, the reason we use turtle graphics isto introduce the idea of functional decomposition and bottom-updevelopment. I have little interest in graphics, personally. Not sure what this means exactly, but I'm sure there're lots of ways to do this.def g:...def f:...def h:...h(g(f(x)))f(h(g(x)))h(h(g(f(h(g(x)whatever. It worked very well for our students, and the fact that turtlegraphics is a toy is important: there's less anxiety playing withBy toy I meant something more like broken toy -- thinking specifically of turtle.py on Windows. One could argue that it's Window's that's the broken toy in this picture. I'd probably smile and nod. I'm not anti-turtle and certainly not anti-Python. I tolerate Windows because I love .NET (so far anyway -- my goal is to be teaching IronPython someday soon, on Linux boxes as well). Maybe at some future SIGCSE (if they stop meeting in Texas -- I'm boycotting that state for the forseeable future, won't go to any events there (Texas has screwed up the Oregon electrical power scene big time, adding to my bill, messing with my quality of living)). toys. I see many, many students who have zero experience withprogramming in high school, and exhibit more anxiety in the first-programming course than in a math course (which at they leasthave a decade of experience with, even if they dislike the topic).TobyThe Shuttleworth Foundation in South Africa is looking at Logo | Squeak | Python as a preferred pipeline. The curriculum is designed for self-teachers, home scholars, i.e. no cadre of qualified teachers need apply. In this model, we'll have gotten the turtle stuff out of the way (on a first pass anyway) with Logo. Python will be under no pressure to star as a turtle graphics platform (it's not known for this now and it's an uphill battle to win recognition for it in this niche). Kids coming into Python will already be highly familiar with turtle stuff, so we can allude to it (in the curriculum, maybe a Moodle -- I've pointed them to two of mine), but we don't introduce either programming or turtles using Python. I'm brainstorming towards the day when high schoolers with no previous programming experience will be the exception more than the rule. That's already the case here in Portland, in some schools anyway. I hope South Africa will get there shortly (you might think they have a long way to go, but actually South Africa is poised for a great leap forward, in the Chinese sense, but we hope without the same stumbling). Kirby ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16
kirby urner schrieb: On 2/28/06, *Toby Donaldson* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: As I pointed out in my message, the reason we use turtle graphics is to introduce the idea of functional decomposition and bottom-up development. I have little interest in graphics, personally. Not sure what this means exactly, but I'm sure there're lots of ways to do this. def g:... def f:... def h:... h(g(f(x))) f(h(g(x))) h(h(g(f(h(g(x) whatever. I suppose, that this is a misunderstanding. In the logo world of computing with beginners, this means to decompose somewhat complex tastks in tiny peaces and write functions for those, wich then can be assembled to solve the complex task. This is the ordinary meaning of bottum-up development. It worked very well for our students, and the fact that turtle graphics is a toy is important: there's less anxiety playing with Right! But that doesn't meen that the toy should be poor. IMO it should offer a rich set of means to solve different tasks. Or - as another example, concerning turtle graphics - it should have good means for animationa as are, for example, possibilities to set the speed of the turtle movements or to set different turtle-shapes, maybe even gifs. This makes programming much more interesting for learners. By toy I meant something more like broken toy -- thinking specifically of turtle.py on Windows. There are easy ways to overcome this and they are still mentioned several times on this list. (It's not necessary to blame windows) One could argue that it's Window's that's the broken toy in this picture. I'd probably smile and nod. I'm not anti-turtle and certainly not anti-Python. I tolerate Windows because I love .NET (so far anyway -- my goal is to be teaching IronPython someday soon, on Linux boxes as well). Maybe at some future SIGCSE (if they stop meeting in Texas -- I'm boycotting that state for the forseeable future, won't go to any events there (Texas has screwed up the Oregon electrical power scene big time, adding to my bill, messing with my quality of living)). toys. I see many, many students who have zero experience with programming in high school, and exhibit more anxiety in the first-programming course than in a math course (which at they least have a decade of experience with, even if they dislike the topic). Toby There are a few important arguments why not to underestimate the importance of a good turtle module in the Python distribution (out of the box as vern ceder says). 1. Many of us are trying to further the use of Python as a first programming language. For them and for their students this would make a great advantage. 2. At least in Europe there ar many teachers who have a good Logo-experience. But now Logo seems to be largely out of date and many are searching for a substitute. As Python has an outstanding clear syntax (imho much clearer than Logo, when it comes to programs beyond turtle-graphics), Python would be a great cadidate. Had it a good turtle module, Python were an even more seductive offer to all those teachers. 3. Compared to its presence in the software world *and* compared to its adequacy as a teaching language, the presence of Python in the educational area is relative is reatively weak. So (many different) things should be done to improve the situation. One of these could definitely be the construction of a better turtle module, which has apparently been started by now. That's a good thing. Everybody hwo wants (and has time to do so ;-( ), should support it. Those who prefer different ways, will (an already do) support those, fortunately. Regards, Gregor The Shuttleworth Foundation in South Africa is looking at Logo | Squeak | Python as a preferred pipeline. The curriculum is designed for self-teachers, home scholars, i.e. no cadre of qualified teachers need apply. In this model, we'll have gotten the turtle stuff out of the way (on a first pass anyway) with Logo. Python will be under no pressure to star as a turtle graphics platform (it's not known for this now and it's an uphill battle to win recognition for it in this niche). Kids coming into Python will already be highly familiar with turtle stuff, so we can allude to it (in the curriculum, maybe a Moodle -- I've pointed them to two of mine), but we don't introduce either programming or turtles using Python. I'm brainstorming towards the day when high schoolers with no previous programming experience will be the exception more than the rule. That's already the case here in Portland, in some schools anyway. I hope South Africa will get there shortly (you might think they have a long way to go, but actually South Africa is poised for a great leap forward, in the Chinese sense, but we hope without the same stumbling). Kirby
Re: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16
I suppose, that this is a misunderstanding. In the logo world ofcomputing with beginners, this means to decompose somewhat complex tastks in tiny peaces and write functions for those, wich thencan be assembled to solve the complex task. This is the ordinarymeaning of bottum-up development.OK, so like test-driven development. Write a test. Write a function that passes the test. Get a bunch of little pieces that work well. Then (and only then) start using these pieces to pass other tests (more complicated tasks). In the world of structured programming, this meant:def f:def g:def h:def main: f; g; hBut today it might be more in terms of subclassing generic classes i.e. in place of main call sequences, we have more specialized forms of composed and inherited object. It worked very well for our students, and the fact that turtle graphics is a toy is important: there's less anxiety playing withRight! But that doesn't meen that the toy should be poor. IMO it shouldoffer a rich set of means to solve different tasks. Or - as another example, concerning turtle graphics - it should have good means foranimationa as are, for example, possibilities to set the speed of theturtle movements or to set different turtle-shapes, maybe even gifs.This makes programming much more interesting for learners. Those weren't my words you were agreeing with, but I guess you knew.I guess I don't see Python as currently very strong in the turtle graphics department. Maybe someday. Maybe even soon. I like spatial turtles, i.e. turtles that swim in XYZ, not just in XY. I played with doing that using Python + POV-Ray a long time ago, i.e. do your movements, then publish a rendering of where you've been. But that's all pretty esoteric. Too advanced for most beginners. http://www.4dsolutions.net/ocn/numeracy3.html (see 'mywalk.pov' -- ironically planar) By toy I meant something more like broken toy -- thinking specifically of turtle.py on Windows.There are easy ways to overcome thisand they are still mentionedseveral times on this list. (It's not necessary to blame windows) You mean with the -n switch? Why not just use some other language that's better at Turtles than Python? is my main question. If you're going to use Turtles as your primary pedagogy, I suggest Logo or some more sophisticated 3D turtle implementation (there's a 3D Logo no?). Python doesn't have a strong literature. Logo does. This may change in future, but for now, that's just the way it is. If you forced me to use Turtles today, I'd use Logo. There are a few important arguments why not to underestimate theimportance of a good turtle module in the Python distribution(out of the box as vern ceder says).1. Many of us are trying to further the use of Python as a first programming language. For them and for their students this wouldmake a great advantage.Again, I don't think turtle graphics is an essential first step. But IF it is, then why not use something other than Python? Like Logo? 2. At least inEurope there ar many teachers who have a goodLogo-experience. But now Logo seems to be largely out of date and many are searching for a substitute.Why is Logo out of date? Use it for 3 classes (?) to set the stage, get through with the turtle stuff, then turn to Python or something else. This idea that we should pick just one language and use it for everything, regardless, is to be avoided. That's not the real world. As Python has an outstanding clear syntax (imho much clearer thanLogo, when it comes to programs beyond turtle-graphics), Python would be a great cadidate. Had it a good turtle module, Python werean even more seductive offer to all those teachers.I don't disagree with this. I just don't see it as a high priority. I'm fine with the idea of using Logo for awhile, moving to Python when the students are more sophisticated and don't need a turtle to motivate their interest. Many students I work with wouldn't agree to use a turtle. That's something for little kids. They're more hungry to become adults. 3. Compared to its presence in the software world *and* comparedto its adequacy as a teaching language, the presence of Python in the educational area is relative is reatively weak.Which doesn't concern me, per above. If Python *never* had a strong turtle graphics capability, I would shed no tears. But if it does, so much the better. I have *no* reason to get in your way on improving Python's turtle abilities. I'm just not seeing these efforts as critical to my own plans i.e. as we say in idiomatic language I'm not holding my breath.So (many different) things should be done to improve the situation. One of these could definitely be the construction of a better turtlemodule, which has apparently been started by now. That's a good thing.Everybody hwo wants(and has time to do so ;-( ), should support it. Those who prefer different ways, will (an already do) support those,fortunately.Regards,GregorYes, I think we're in agreement. I plan to stop saying anything on this topic,
Re: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16
On 3/1/06, Gregor Lingl [EMAIL PROTECTED] wrote: [snip] There are a few important arguments why not to underestimate the importance of a good turtle module in the Python distribution (out of the box as vern ceder says). 1. Many of us are trying to further the use of Python as a first programming language. For them and for their students this would make a great advantage. 2. At least in Europe there ar many teachers who have a good Logo-experience. But now Logo seems to be largely out of date and many are searching for a substitute. Have you (/they) considered something like Guido van Robot, or RUR-PLE? André As Python has an outstanding clear syntax (imho much clearer than Logo, when it comes to programs beyond turtle-graphics), Python would be a great cadidate. Had it a good turtle module, Python were an even more seductive offer to all those teachers. 3. Compared to its presence in the software world *and* compared to its adequacy as a teaching language, the presence of Python in the educational area is relative is reatively weak. So (many different) things should be done to improve the situation. One of these could definitely be the construction of a better turtle module, which has apparently been started by now. That's a good thing. Everybody hwo wants (and has time to do so ;-( ), should support it. Those who prefer different ways, will (an already do) support those, fortunately. Regards, Gregor ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16
Have you (/they) considered something like Guido van Robot, or RUR-PLE? André I think it would be cool to have a simple 2D turtle library which scaled up (maybe via PYRO) to 3D simulated robots, then (again via PYRO) to physical robots. But that won't be part of the standard library, so it's out of scope for this particular thread. --Dethe ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] turtle-rurple [Was Digest 31/16]
Andre Roberge schrieb: On 3/1/06, Gregor Lingl [EMAIL PROTECTED] wrote: [snip] ... Have you (/they) considered something like Guido van Robot, or RUR-PLE? When I was younger, in 1986, together with friends I wrote a schoolbook called Werkzeug Computer (Werkzeug=tool). Then I implemented a version of Karel the Robot in Turbo Pascal. It was a complete IDE with syntax colouring, visual tracing etc etc. The compiled code was 64k - 20 bytes approx, which was the utmost limit of Turbo Pascal 3.0 then. It was a big success and was used by some Austrian teachers until recently. (I think it still can be run in a DOS - Window.) A short time afterwards I leared to know Logo, and so turtle graphics also. Now I find this more rewarding. It provides nearly every advantage of the Robot plus a lot more freedom and space for new ideas. (*) If I had the time, I'd like to translate also GvR or RUR_PLE to German, but now I'm involved in my Turtle-Project and maybe there will be a second edition of my book Python für Kids - (I well remember, that you asked me for an English translation one or two years ago.) During the last few month together with Mike Müller from Leipzig I've completed a (still raw) translation of How to think like a computer scientist - the Python way to German. (German readers may find it here: http://ada.rg16.asn-wien.ac.at/~python/how2think/ and are invited for feedback ...) You see, I'm really a fan of providing different ways ... But currently RUR-PLE surpasses my capacities for the moment. If you know of a German translation on the way, let me know. Maybe I can put a short section or at least a hint to it in my book) Best wishes Gregor (*) If you tried out my Xturtle-examples you could easily grasp, what I mean with this. -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] turtle-rurple [Was Digest 31/16]
On 3/1/06, Gregor Lingl [EMAIL PROTECTED] wrote: Andre Roberge schrieb: On 3/1/06, Gregor Lingl [EMAIL PROTECTED] wrote: [snip] Have you (/they) considered something like Guido van Robot, or RUR-PLE? When I was younger, in 1986, together with friends I wrote a schoolbook called Werkzeug Computer (Werkzeug=tool). Then I implemented a version of Karel the Robot in Turbo Pascal. It was a complete IDE with syntax colouring, visual tracing etc etc. The compiled code was 64k - 20 bytes approx, which was the utmost limit of Turbo Pascal 3.0 then. It was a big success and was used by some Austrian teachers until recently. (I think it still can be run in a DOS - Window.) A short time afterwards I leared to know Logo, and so turtle graphics also. Now I find this more rewarding. It provides nearly every advantage of the Robot plus a lot more freedom and space for new ideas. (*) I just looked at Xturtle; nice work! I am *strongly* considering the inclusion of turtle graphics within RUR-PLE. However, since it is based on wxPython instead of Tkinter, I should probably rewrite it almost from scratch (so that I understand it, in any event ;-). If I had the time, I'd like to translate also GvR or RUR_PLE to German, but now I'm involved in my Turtle-Project and maybe there will be a second edition of my book Python für Kids - (I well remember, that you asked me for an English translation one or two years ago.) Yes, I do remember. And I still would be curious to see such a translation. As it is now, with RUR-PLE, I have about 50 lessons written (36 have been released) and am thinking of converting it into a publish-on-demand book (for those that like to hold a physical book). You see, I'm really a fan of providing different ways ... But currently RUR-PLE surpasses my capacities for the moment. If you know of a German translation on the way, let me know. Maybe I can put a short section or at least a hint to it in my book) That might be nice :-) I don't know of any German translation in the works. One thing I did this past week was to change the way language translation was implemented, from my own idiosyncratic version to a new version that makes use of .po files. These can be translated by non-programmers. At the moment, the programme UI is available in English, French and Spanish. Existing lessons are being translated into Spanish... I guess I will have to do a French translation soon, just as a matter of personal pride! Best wishes Gregor (*) If you tried out my Xturtle-examples you could easily grasp, what I mean with this. As I wrote above, I did... very impressive!! André ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] turtle-rurple [Was Digest 31/16]
Andre Roberge schrieb: I am *strongly* considering the inclusion of turtle graphics within RUR-PLE. However, since it is based on wxPython instead of Tkinter, I should probably rewrite it almost from scratch (so that I understand it, in any event ;-). Did you know, that there is a powerful turtle graphics module contained in PythonCard - which is a wxPython extension as far as I know. It has a lot of interesting examples Gregor -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16
On 3/1/06, kirby urner [EMAIL PROTECTED] wrote: I suppose, that this is a misunderstanding. In the logo world of computing with beginners, this means to decompose somewhat complex tastks in tiny peaces and write functions for those, wich then can be assembled to solve the complex task. This is the ordinary meaning of bottum-up development. OK, so like test-driven development. Write a test. Write a function that passes the test. Get a bunch of little pieces that work well. Then (and only then) start using these pieces to pass other tests (more complicated tasks). In the world of structured programming, this meant: def f: def g: def h: def main: f; g; h But today it might be more in terms of subclassing generic classes i.e. in place of main call sequences, we have more specialized forms of composed and inherited object. I think the Scheme folks get it right when they start with functions before moving on to OOP. I've cribbed a lot of ideas from work in Scheme education and tried to apply it to Python. Toby -- Dr. Toby Donaldson School of Computing Science Simon Fraser University (Surrey) ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16
I want to throw out one idea that worked great for me in my initial introduction to cs. In our class our first programs generated simple postscript (ie - turtle graphics) which we then sent to a printer (well, ghostscript first, to save a few trees). By week two we were generating mandlebrot sets, and recursive artwork the week after. http://www.cs.princeton.edu/courses/archive/spr01/cs126/assignments/mandel.html best of both worlds? At least we got to making art quickly. Best, /Jonah Toby Donaldson wrote: On 3/1/06, kirby urner [EMAIL PROTECTED] wrote: On 2/28/06, Toby Donaldson [EMAIL PROTECTED] wrote: As I pointed out in my message, the reason we use turtle graphics is to introduce the idea of functional decomposition and bottom-up development. I have little interest in graphics, personally. Not sure what this means exactly, but I'm sure there're lots of ways to do this. def g:... def f:... def h:... h(g(f(x))) f(h(g(x))) h(h(g(f(h(g(x) whatever. I mean cutting up large problems into smaller ones according function, and then creating the resulting program by first writing (and testing) small functions, and then combining those to make larger functions. Your example shows the syntax of function calling, but the more interesting question is how do you get h, g, and f in the first place? It worked very well for our students, and the fact that turtle graphics is a toy is important: there's less anxiety playing with By toy I meant something more like broken toy -- thinking specifically of turtle.py on Windows. One could argue that it's Window's that's the broken toy in this picture. I'd probably smile and nod. Well, in this case, it's clearly turtle.py that's lacking. I'm not anti-turtle and certainly not anti-Python. I tolerate Windows because I love .NET (so far anyway -- my goal is to be teaching IronPython someday soon, on Linux boxes as well). Maybe at some future SIGCSE (if they stop meeting in Texas -- I'm boycotting that state for the forseeable future, won't go to any events there (Texas has screwed up the Oregon electrical power scene big time, adding to my bill, messing with my quality of living)). toys. I see many, many students who have zero experience with programming in high school, and exhibit more anxiety in the first-programming course than in a math course (which at they least have a decade of experience with, even if they dislike the topic). Toby The Shuttleworth Foundation in South Africa is looking at Logo | Squeak | Python as a preferred pipeline. The curriculum is designed for self-teachers, home scholars, i.e. no cadre of qualified teachers need apply. In this model, we'll have gotten the turtle stuff out of the way (on a first pass anyway) with Logo. Python will be under no pressure to star as a turtle graphics platform (it's not known for this now and it's an uphill battle to win recognition for it in this niche). Kids coming into Python will already be highly familiar with turtle stuff, so we can allude to it (in the curriculum, maybe a Moodle -- I've pointed them to two of mine), but we don't introduce either programming or turtles using Python. Logo is a non-starter. For my purposes, a practical language is a necessity, if only because some students need practical skills to get programming jobs on co-op terms. Personally, I far prefer turtle graphics in Python than Logo since Python is much more readable. I've suggested Squeak to a few people, and there's been close to zero interest. It's not considered very practical, and the language syntax is generally considered a major problem. I'd guess it is less of a problem for complete novices, but it's just too esoteric and impractical to be a contender. I'm brainstorming towards the day when high schoolers with no previous programming experience will be the exception more than the rule. That's already the case here in Portland, in some schools anyway. I hope South Africa will get there shortly (you might think they have a long way to go, but actually South Africa is poised for a great leap forward, in the Chinese sense, but we hope without the same stumbling). That would be nice: programming anxiety is a bigger problem than math anxiety at my campus. Toby -- Dr. Toby Donaldson School of Computing Science Simon Fraser University (Surrey) ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig