That Other Use for Squeak
Lawson English
english at primenet.com
Sun Jul 2 22:19:11 UTC 2000
I said:
> Heh.
>
> I'd venture to say that virtually EVERY graduate of a 2-year associates of
> applied science programming degree can do this kind of thing.
>
> My SON (who is only 13) can do this kind of thing. He's been doing that kind
> of thing for the last month while being lead programmer in a games
> programming camp for Junior High Schoolers.
>
>
> It's all in how it is taught.
I was correct.
My son pointed out that he's not very good at accepting input, but assuming
that one HAS gotten the number, here's his algorithm:
Grab the number and put it into a control-array [he learned arrays in the
context of VB controls so he calls all arrays "control arrays].
Once you're done, repeat from 0 to array.count-1
if array[index} >= 0
add array[index] to summ
add 1 to p
av = sum/p
Q: What about the negative case?
A: put in the line
"if array[index] >= 0 OR neg = TRUE
add array[index] to summ
add 1 to p
av = sum/p
He came up with the answer on-the-fly, with almost no pauses at all.
--
Reform Party members should be advised that there will be TWO names on the
Reform Party presidential ballot:
John Hagelin <http://www.hagelin.org>
Pat Buchanan <http://www.bucanan.org>
Make and informed choice!
--
More information about the Squeak-dev
mailing list
|