[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LOGO-L> Questions and problems



Olga Tuzova wrote:
> 
 
> 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.

Hello Olga,

This sort of problems I do like.

I suggest the following:

Tell your students that Logo evaluates mathematical expressions FROM
RIGHT TO LEFT. So, when Logo "sees" the mathematical expression
        [0 0]/:a 
it is puzzled, and produces an error message, since it can't divide a
*list* by some value! What you want is to divide the
        (distance <to> [0 0])
by a value, and hence the need for the parentheses.

Alternatively you can write:

        LOCALMAKE "DIST DISTANCE[0 0]
        SHOW :DIST/:A


> 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.

In math, POWER is a "standard" mathematical operator, with a "high"
degree of precedence. In Logo, POWER is not a "standard" mathematical
operator, hence its precedence is lower even then that of "+" or "-".
This might be a problem, until the students get the needed experience
with Logo-ish POWER. 
Also, you might try here too the LOCALMAKE trick:

        LOCALMAKE "DIST DISTANCE[0 0]
        PR (POWER DIST 2)/(:a*:a+:a*:a)
        
Regards,

[[Yehuda]]

---------------------------------------------------------------
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