I've imitated Ken's ToonTalk factorial demonstrations using MicroWorlds. IHi,
haven't put in the scales (to compare the numbers) or bird (to fetch the
answer) at this stage but they could be added if desired.I think MicroWorlds allows for multiple representations of factorial better
than ToonTalk. I'm putting this up as a hypothesis to be debated / refuted.
ToonTalk only permits a visual representation (which also requires
abstraction -- Dusty erasing numbers in the thought bubble) whereas in
MicroWorlds you can show it by either a high powered recursive procedure
(most elegant but difficult for unsophisticated users) or a visual / text
combination, which seems to me to require less abstraction (and so would be
more accessible for more kids).MicroWorlds solutions:
1) Most elegant but difficult:to factorial :no
if :no = 1 [op 1]
op (product :no factorial :no - 1)
end
This level of programming is suitable for students (kids or grownups alike) who know already what's a function, and what is a recursive function.
A "simpler" solution might be, to take an iterative approach, instead of a recursive one:
to mainIt's basically your third MW program, I think, stripped off from graphics and animation, in standard Logo.
ct
factorial readword 1
endto factorial :num :total
if :num<2[pr :total stop]
factorial :num-1 :num*:total
end
Please verify that any version of the program "knows" that 0!=1 (your recursive program above has to be slightly modified for this).
Regards and a happy new year,
Yehuda,
_/
_/ _/ _/_/_/_/_/ _/_/_/_/
_/
_/ _/_/ _/
_/
_/_/_/
_/ _/ _/ _/
_/ _/
_/_/_/_/ _/ _/
_/
_/_/ _/ _/ _/_/_/_/
http://www.geocities.com/CollegePark/lab/2276/
e-mail: yehuka@softhome.net
---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org. Mail
questions about the list administration to logofdn@gsn.org. To
unsubscribe send unsubscribe logo-l to majordomo@gsn.org.
Global SchoolNet Foundation -
Linking Kids Around the World!
Copyright GSN - All Rights Reserved
- Comments
& Questions
Visit GSN's
Global
Schoolhouse for more exciting learning resources!
Search our Site
-
Home