[Edu-sig] a non-rhetorical question

Andre Roberge andre.roberge at gmail.com
Fri Jul 6 20:29:06 CEST 2007


On 7/6/07, Vern Ceder <vceder at canterburyschool.org> wrote:
> Tom,
>
> Yeah, if they've got dictionaries, then your way is both elegant and
> "Pythonic" ;-)
>

Except that ".keys()" is not needed in a truly Pythonic program ;-)

But, this is straying far from the original question.  These are kids
that have had a few weeks of instruction (with probably less than 6
hour of class time per week).  What can be reasonably expected of
them?

Does anyone on this list (other than Vern) who has taught high school
kids an intro to programming for just a few weeks can answer Andy's
question?    Note that non-classroom teaching (like Kirby does for
motivated kids) does not count!

Where is Jeff Elkner when we need him?.... ;-)

André

> Cheers,
> Vern
>
> Tom Hoffman wrote:
> > On 7/6/07, Andy Judkis <ajudkis at verizon.net> wrote:
> >> Vern, Richard,
> >>
> >> Your comments were very helpful -- it's sometimes hard for me to see the
> >> question as a student would. They can imitate nicely, but asking them to
> >> analyze and synthesize (as this question does, at a very superficial level)
> >> seems to be asking a lot -- yet it's the essence of programming.
> >>
> >> Reading between the lines of Vern's message, I wonder how he would want
> >> students to answer the question.  What I was looking for was more or less
> >> what he considered the wise-guy answer:
> >>
> >> while True:
> >>     resp = raw_input("Who is hottest teacher?")
> >>     if resp == "Mr. Judkis":
> >>         print "Excellent choice!"
> >>         break
> >>     elif resp == "Mrs. McGrath":
> >>         print "Also a fine choice."
> >>         break
> >>     else:
> >>         print "Wrong, sorry. . ."
> >
> > Here's the most elegant solution I could come up with:
> >
> > teachers = {'Mr. Judkis':'Excellent Choice',
> >             'Mrs. McGrath':'Also a fine choice.'}
> > name = raw_input()
> > while name not in teachers.keys():
> >     print 'Wrong, sorry.'
> >     name = raw_input()
> > print teachers[name]
> >
> > --Tom
> > _______________________________________________
> > Edu-sig mailing list
> > Edu-sig at python.org
> > http://mail.python.org/mailman/listinfo/edu-sig
>
> --
> This time for sure!
>     -Bullwinkle J. Moose
> -----------------------------
> Vern Ceder, Director of Technology
> Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804
> vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>


More information about the Edu-sig mailing list