Olga Tuzova wrote: > > Dear friends, > > I've got some problems and need your help. > > Some time ago our dear Yehuda has suggested interesting ideas about > how to involve students into the exploration of the geometrical > shapes. I liked Yehuda's proposals and developed special > MSWLogo lessons plan for my 7th graders, who have just began to learn > Geometry. Step by step, they have to explore squares, rectangles, > polygons. They are performing computer experiments, making hypothesis, > trying to prove or reject them, analyzing data. > All this turned to be more difficult, than I have expected and > sometimes unexpected problems occur. > I can divide them into two categories -- "local" problems and > "global" ones. > > Local problems. > > 1. The students have to estimate the ratio diagonal/side for > different squares. The value of the diagonal they get as an output of > the distance function. > I can't explain them clearly, why they should put parenthesis around > distance [0 0], that is, why the line > show distance [0 0]/:a > is wrong. > > 2. The notations in Logo and in Algebra are different and sometimes > students don't see what stands behind this or that formula. For > example, when they see that (power distance [0 0] 2)/(:a*:a+:a*:a) > is equal to 1, they can't formulate in words what they have come to. > > Have you any suggestions how to deal with this? > > Global problems. I'm afraid, these problems are familiar to many of > you. They are problems of the education. > > This my experience showed that the students are very poor in most > important points. Their ability in observation and analyzing data is > very-very low. When they come to the obviously erroneous results, > they don't see it's absurdity. And, they can't make hypothesis about > what is going to be even in simple cases. > For example, one of the girls (rather smart one) came to the fact > that (power distance [0 0])/(:a*:a) = 2. > Being asked, what we'll get if we take :a*:a+:a*:a instead of just > :a*:a, she accepted this as a new task, made several experiments for > different :a, but her program contained a bug. She wrote: > (power distance [0 0])/(:a*:a)+(:a*:a) You can imagine, what numbers > she has got, but they haven't confused her a bit. > > I'd be glad to hear any comments. > > Thank you, > Olga. There are several things that are happening here. But first Logo does not evaluate expressions from right to left. It evaluates from left to right unless the precedence of an operator says to do otherwise. Precedence means which operators or operations have priority over another. ? 1 + [0] + 3 + [3] + 4 + doesn't like [0] as input If logo parse from right to left the [3] would of been complained about first. Here is a little proof of the existence of precedence: ? 1 + [0] / 3 / doesn't like [0] as input ? 1 + [0] - 3 + doesn't like [0] as input ? Notice in the first example "/" is complaining and in the second example "+" is complaining. That's because "/" has precedence over "+" or "-" and now the parse is proceding left to right rather than jump ahead to the "/". Back to your question: One reason for the complication is that Logo is very non restrictive and this is one of the penalties you pay for it. Most languages require the Parans to define where the list of arguments begin and end. Logo does not force this on you and basically tries to do the right thing. Another reason is that logo treats all "tokens" (numbers, strings, lists, definitions etc.) as the same (there are no TYPEs) until the desired function try's to act upon them. These same "flaws" are tightly coupled to what makes Logo powerful in many other respects (e.g. you can pass code as data or data as code). The other reason is that all infix operators (+-/*) in logo have higher precedence than prefix functions (named functions like distance). One other reason is that many cases (as yours is) you are mixing Prefix operations with infix operations. quotient distance [0 0] 2 Will do what you desire because it won't jump ahead and try to do the quotient first. The problem you describe is dangerous because it will not always generate an error, for example. show sqrt 2/3 Is it sqrt (2/3) or (sqrt 2)/3 don't let logo decide you decide by being explicit as to what you want. It also makes it clear for the next person reading it which might read it incorrectly. It's always a safe bet to use parens in mathematical expressions even on paper to be clear what order you expect and want things done in. I hope Brian will have a few comments for you. -- =============================================================== George Mills email: mills@softronix.com http://www.softronix.com The www page contains some very powerful educational software. Our single most important investment is our kids. --------------------------------------------------------------- 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