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

Re: LOGO-L> Word Sculpturing



Ray ==>

Here's a couple of word sculpturing procedures that demonstrate tail-end
and embedded recursion.

Tail-end
========

TO WORDTRIANGLE :WORDS
IF :WORDS = " [STOP]
PR :WORDS
WORDTRIANGLE BUTFIRST :WORDS
END

EMBEDDED
========

TO WORDTRIANGLE :WORDS
IF :WORDS = " [STOP]
WORDTRIANGLE BUTFIRST :WORDS
PR :WORDS
END

There's just one problem. The second procedure starts printing the last
letter and then adds letters until :WORDS is printed.

A challenge for you...
======================

Write a procedure that makes the same shape of triangle but starts with the
first letter, then the first and second, first three, etc.

Something else to think about.

Regards...Jim

PS:  How about a rectangle?  Of variable size?


>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>
Jim Muller
jmul@cyberramp.net
The Great Logo Adventure at
http://www.cyberramp.net/~jmul
>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>
---------------------------------------------------------------
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