At 8:37 PM +0200 3/21/98, Yehuda Katz wrote: >Hi, > >You might want to take a look at: > > http://www.ionet.net/~timtroyr/funhouse/beer.html#unique > >Select the Beer List and then Item 114. > >Enjoy it, > >[[Yehuda]] > > > _/ _/ _/ _/_/_/_/_/ _/_/_/_/ > _/ _/ _/_/ _/ _/ > _/_/_/ _/ _/ _/ _/ > _/ _/ _/_/_/_/ _/ _/ > _/ _/_/ _/ _/ _/_/_/_/ > A fun site! I'd write the Logo code this way: to 99bottles take-em-down 99 end to take-em-down :how-many if :how-many = 0 [stop] print sentence :how-many [bottles of beer on the wall] print sentence :how-many [bottles of beer] print [take one down, pass it around,] print sentence :how-many - 1 [bottles of beer on the wall] pr [] take-em-down :how-many - 1 end ...and while we're recursing, how about: to 99bottles take-em-down 99 end to take-em-down :how-many if :how-many = 0 [put-em-back :how-many stop] print sentence :how-many [bottles of beer on the wall] print sentence :how-many [bottles of beer] print [take one down, pass it around,] print sentence :how-many - 1 [bottles of beer on the wall] pr [] take-em-down :how-many - 1 end to put-em-back :how-many if :how-many = 99 [take-em-down :how-many stop] print sentence :how-many [bottles of beer on the wall] print sentence :how-many [bottles of beer] print [pass one around, put it back up,] print sentence :how-many + 1 [bottles of beer on the wall] pr [] put-em-back :how-many + 1 end -------------------------------------------------------- Michael Tempel tel: 212 579 8028 Logo Foundation fax: 212 579 8013 250 West 85th Street michaelt@media.mit.edu New York NY 10024 http://el.www.media.mit.edu/logo-foundation/ --------------------------------------------------------------- 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