Intro and question: assignments/projects for year end
Hello, My name is Sheila King. I'm a high school AP Computer Science teacher. Heh. AP Exam is tomorrow! I've been learning Python for myself since January. If you read comp.lang.python or the Python Tutor List, you've seen my posts there, probably. Anyway, for the last two or so weeks of the school year, what I'm going to have my AP Comp Sci students do is this: They get a choice of two possible types of projects: (1) CMU graphics. (this is what all of my students did last year.) (2) Learn Python. I must've given a pretty convincing speech about Python, because 10 of my 17 students picked to do Python. I was surprised. I thought most of them would want to do a graphics project. (Last year's class wrote a number of different games.) Anyhow...here's my question: I'm looking for suggested projects or programming problems for my students. They have had a year of C++, and some of them are excellent. Some are only barely proficient. I know the good ones will pick up Python easily. I hope the others will be able to do so, as well. It's going to be sort of independent study. (I'm putting several HTML tutorials on their desktops...) If they only have about two weeks to "learn" Python, and write a small program or two, what types of things could I have them do? We won't have time to get into GUIs. These can't be very ambitious projects, due to the limited amount of time. -- Sheila King http://www.thinkspot.net/sheila/ http://www.k12groups.org/
Sheila King writes:
Hello,
My name is Sheila King. I'm a high school AP Computer Science teacher. Heh. AP Exam is tomorrow! I've been learning Python for myself since January. If you read comp.lang.python or the Python Tutor List, you've seen my posts there, probably.
Anyway, for the last two or so weeks of the school year, what I'm going to have my AP Comp Sci students do is this: They get a choice of two possible types of projects: (1) CMU graphics. (this is what all of my students did last year.) (2) Learn Python.
I must've given a pretty convincing speech about Python, because 10 of my 17 students picked to do Python. I was surprised. I thought most of them would want to do a graphics project. (Last year's class wrote a number of different games.)
Anyhow...here's my question: I'm looking for suggested projects or programming problems for my students.
They have had a year of C++, and some of them are excellent. Some are only barely proficient. I know the good ones will pick up Python easily. I hope the others will be able to do so, as well. It's going to be sort of independent study. (I'm putting several HTML tutorials on their desktops...)
If they only have about two weeks to "learn" Python, and write a small program or two, what types of things could I have them do? We won't have time to get into GUIs. These can't be very ambitious projects, due to the limited amount of time.
How much did they understand OO from C++? Some of the neat things Kirby Urner has come up with here really show off the power of objects and state -- and there are lots of possibilities for "create an object which models the behavior of..." (something from mathematics or language or everyday experience). _Structure and Interpretation of Computer Programs_ has some great exercises and projects -- they are oriented toward Scheme, but some of them transfer well. Python has plenty of high-level data types and procedures. A friend of mine wrote a program which uses a phonetic dictionary to find haiku which happen to appear in regular prose text -- for example, in a speech by Richard Stallman, One person gains one dollar by destroying two dollars' worth of wealth. Writing parsers and interpreters can be interesting. _SICP_ spends a lot of time on this, partly to reinforce the idea that interpreters and compilers are "just" computer programs. You could do a "how would you design a computer language?" or "how would you design a program which could interpret this toy language?". Symbolic algebra -- parse expressions into trees, try to find ways to manipulate them (simplify, factor, expand, evaluate, add, subtract, or multiply them; do symbolic differentiation if students know what it is). Give a specification for a Turing machine and have students write a simulator for it. Then have them see if they can write some simple Turing machine programs. (They don't have to prove universality, or equivalence to other computing models, or that there are non-computable numbers -- although it could be nice to talk about this, because many high school classes spend more time on "how to compute particular things" than "what can be computed".) Given urllib, write a web browser (text only). Conway's Game of Life. Core War. A stack-based calculator -- push, pop, operations. You could then also talk about, or have students talk about, RPN. Can they see how to convert between RPN and infix? Why RPN doesn't need parentheses? Compress images (given in the form of arrays, like a list of lists of integers) or text (given in the form of a string, or a file that you open and then read the contents of). Maybe students can discuss how they would handle compression and see who can come up with the most effective techniques. (In junior high school I re-discovered run-length encoding, but I never would have figured out Huffman coding or LZW or anything like that.) You could have a contest to see who could come up with the most efficient lossless compressor. (I know it wouldn't be very good compared to gzip, but it would still be interesting to see what ideas occur to students, and whether they can correctly implement _some_ original lossless compressor and its corresponding decompressor.) Some of those may be very ambitious; it depends on your students. I hope they're at least interesting. -- Seth David Schoen <schoen@loyalty.org> | And do not say, I will study when I Temp. http://www.loyalty.org/~schoen/ | have leisure; for perhaps you will down: http://www.loyalty.org/ (CAF) | not have leisure. -- Pirke Avot 2:5
-----Ursprüngliche Nachricht----- Von: "Seth David Schoen" <schoen@loyalty.org>
Given urllib, write a web browser (text only).
That's the best suggestion, IMHO - so they'll have a web browser for themselves that's not stinking slow and hogs all memory... (I'd like to have one myself) Dirk Heise What's a life and where do i get one?
Hello,
My name is Sheila King. I'm a high school AP Computer Science teacher. Heh. AP Exam is tomorrow! I've been learning Python for myself since January. If you read comp.lang.python or the Python Tutor List, you've seen my posts
probably.
Anyway, for the last two or so weeks of the school year, what I'm going to have my AP Comp Sci students do is this: They get a choice of two possible types of projects: (1) CMU graphics. (this is what all of my students did last year.) (2) Learn Python.
I must've given a pretty convincing speech about Python, because 10 of my 17 students picked to do Python. I was surprised. I thought most of them would want to do a graphics project. (Last year's class wrote a number of different games.)
Anyhow...here's my question: I'm looking for suggested projects or programming problems for my students.
They have had a year of C++, and some of them are excellent. Some are only barely proficient. I know the good ones will pick up Python easily. I hope
others will be able to do so, as well. It's going to be sort of independent study. (I'm putting several HTML tutorials on their desktops...)
If they only have about two weeks to "learn" Python, and write a small
Hi Sheila Congratulations.. I would love to know what _did_ you say in your speech? Here are my enthusiatic, (but propably over ambitious) suggestions. I think since time is so short, you may be better off helping them enagage in the wide world of Python, and give them motivation and basic skills so they can keep going by themselves with it. A. INSPIRATION: TOOLKITS & MODULES One one the great virtues of Python is its community and the scope of contributed nmodules. So I think one appraoch might be to explore with your students The Vaults of Parnassus http://www.vex.net/parnassus This will expose them to the possibilities and also offer endless examples of code. Perhaps pick something simple and show them how to make use of it. This is valuable skill which will carry them way beyond the precious few weeks they have allocated. I think learning to read real code is half the battle. Fortuntately readability is Python's #1 virtue once you get past those __wierd__ __words__. Books and tutorials often fail because as a newbie one does not understnd where they are going or why. Or it just plain boring! As babies we did not 'study' grammer, we are born into a world of bustling taklative adults with whom we are motivated to communicate, by love hunger expression etc. This is 'natural learning' and is incredibly effective since the wrl began. How thento induce even a littlw of that in students learning another Human langauge [..in this instance Python]? B. FEEDBACK Do something which allows interactive feedback - some visible/audible/tangible results. Perhaps graphic, perhaps sound, text manipulation or web related. Not as distraction but to see how one can use python to build up things and connect them to others. C. RESOURCES Among the wonderful modules you should definitely stop at Kirby's pages. Check out VPython http://virtualphoton.pc.cc.cmu.edu/projects/visual/ 2 weeks background ok. PIL - Python Imaging Library http://www.pythonware.com/products/pil/ Once installed you can immediately start manipulating images with minimal Python experience. This very manageable. PIL has good clear PDF docs you print out. 2 weeks background ok. Have fun with language. Perhaps there are some poets in the class.. http://www.cs.brandeis.edu/~steele/sources/wordnet-python.html SNACK http://www.speech.kth.se/snack/ <quote> The Snack Sound Toolkit is designed to be used with a scripting language such as Tcl/Tk or Python. Using Snack you can create create powerful multi-platform audio applications with just a few lines of code. </quote> MIDI http://www2.hku.nl/~simon2/python/ BLENDER http://www.blender.nl 3D Modelling and animation software with game engine and a Python API: http://www.janw.gothere.uk.com/documentation.html Blender itself woudl take up all your time to learn, but despite theis there is great value in discussing it with your sutdents a littel and revierwing some of the excellent but eclectic Python materials forit. I imagina at leat one of your tudents will keep going after the course is over: Start here =>a nice list of scripts: http://honk.physik.uni-konstanz.de/~strubi/3d/python/ for example in 15 minutes you can look over the illustrated scripts at: http://home.iae.nl/users/exwhale/blender/main/scripts.html take even a sinmple one for dsicussion: Some of the Python Blender sites are very good intro tutuorial sites, becuse they are writeen by motivated oung hackers taching each other. they don't suffer from too many years of CS training.. some are very well illustrated and broken down into good clear step by step common language. I recommend you to look at the bilingual pages at http://jmsoler.free.fr/didacticiel/blender/tutor/english/index_prog_python.h tm and then rad through the sequence http://jmsoler.free.fr/didacticiel/blender/tutor/english/python_script01.htm http://jmsoler.free.fr/didacticiel/blender/tutor/english/python_script02.htm etc.. An another is Crystal Space http://crystal.linuxgames.com/ 0.14 - A free portable 3D engine written in C++, with python scripting support. Adn lastly.. A 16-year old LA hacker's page http://jesswei.tripod.com/programs.html hth ./Jason ___________________________________________________________ Jason CUNLIFFE = NOMADICS['Interactive Art and Technology'] ----- Original Message ----- From: "Sheila King" <sheila@thinkspot.net> To: <edu-sig@python.org> Sent: Tuesday, May 08, 2001 2:58 AM Subject: [Edu-sig] Intro and question: assignments/projects for year end there, the program
or two, what types of things could I have them do? We won't have time to get into GUIs. These can't be very ambitious projects, due to the limited amount of time.
If they only have about two weeks to "learn" Python, and write a small program or two, what types of things could I have them do? We won't have time to get into GUIs. These can't be very ambitious projects, due to the limited amount of time.
If they can't do GUI's, let's see if we can write something that lets your students play around with graphics. For the CS3 class, the last 2 weeks of the introductory CS class covers a barrage of topics, including fractals: http://www-inst.EECS.Berkeley.EDU/~cs3/lectures/l23/l23.html To make this accessible to Scheme students, we provide them with a simplified interface to a Scheme canvas, using a teachpack for DrScheme: http://www-inst.EECS.Berkeley.EDU/~cs3/misc/graphics-teachpack.scm which allows them to play around with fractal programs without worrying too much: all they need to really remember is (clear-graphics) (draw-line) which still gives them enough power to draw pretty intricate looking fractals. I've almost completed a version in Python that works similarly to the Scheme teachpack. Give me a day or so. *grin* Ideally, a student can do something like: ### from graphics import * clearGraphics() drawLine(0, 0, 100, 0) drawLine(100, 0, 100, 100) drawLine(100, 100, 0, 100) drawLine(0, 100, 0, 0) ### to get a box drawn on the screen. And they can write procedures that generate general boxes, given the upper-left/bottom-right coordinates. What I have right now uses Tkinter and almost works --- I just need to finish some of the implementation details.
C. RESOURCES Among the wonderful modules you should definitely stop at Kirby's pages.
These are mostly linked from: http://www.inetarena.com/~pdx4d/ocn/cp4e.html I've gotten a lot of mileage out of the Python + Povray synergy, the latter being a powerful, no cost ray-tracer. Povray runs off ascii text files (.pov) which you can have Python write. I mostly can (or bottle) polyhedra in Python, using a primitive vector class. Here are some of my fancier graphics, developed with Python's assistance: http://www.inetarena.com/~pdx4d/ocn/concavedodeca.html Crytography is another topic I take up. I've got both letter substitution cipher modeled on Enigma (sort of), and an intro to RSA (patent expired on that algorithm, kids can use freely). All this stuff is non-GUI (I use Python's IDLE for development, itself a GUI). There may be nothing suitable as is, but there might be something that sparks an imagination or two, plus example source code. Kirby
On Mon, 7 May 2001, Sheila King wrote:
I must've given a pretty convincing speech about Python, because 10 of my 17 students picked to do Python. I was surprised. I thought most of them would want to do a graphics project.
Why not do both? For example, look at VPython: http://cil.andrew.cmu.edu/projects/visual This is used, among other places, in a freshman physics class (Matter & Interactions). Some of the students have no programming experience at all, but all are writing 3D physical simulations after two 1 hour lab sessions. I think APCS students should be able to do a few interesting things with it in 2 weeks. Of course, the other suggestions people have made sound very interesting also. Dave
participants (7)
-
Daniel Yoo
-
David Scherer
-
Dirk-Ulrich Heise
-
Jason Cunliffe
-
Kirby Urner
-
Seth David Schoen
-
Sheila King