Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: "LogoForum@xxxxxxxxxxxxxxx" <LogoForum@xxxxxxxxxxxxxxx>, MWForum <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: 10 green bottles
From: "Daniel Ajoy" <da.ajoy@xxxxxxxxx>
Date: Sat, 25 Sep 2010 21:31:50 -0500

On Sat, 25 Sep 2010 21:09:35 -0500, forster wrote:

> http://kidsprogramming.pbworks.com/10+green+bottles


This will be my Logo contribution:

to 10bottles [:number 10]
 if :number = 0 [stop]
 repeat 2 [
  print (sentence :number [green] bottle :number [hanging on the wall])
 ]
 print [If one green bottle should accidently fall]
 print (sentence [There would be] (:number - 1) (bottle :number - 1) [hanging 
on the wall])
 (10bottles :number - 1)
end

to bottle :number
if :number = 1 [output [bottle]]
output [bottles]
end


10bottles

10 green bottles hanging on the wall
10 green bottles hanging on the wall
If one green bottle should accidently fall
There would be 9 bottles hanging on the wall
9 green bottles hanging on the wall
9 green bottles hanging on the wall
If one green bottle should accidently fall
There would be 8 bottles hanging on the wall
8 green bottles hanging on the wall
8 green bottles hanging on the wall
If one green bottle should accidently fall
There would be 7 bottles hanging on the wall
7 green bottles hanging on the wall
7 green bottles hanging on the wall
If one green bottle should accidently fall
There would be 6 bottles hanging on the wall
6 green bottles hanging on the wall
6 green bottles hanging on the wall
If one green bottle should accidently fall
There would be 5 bottles hanging on the wall
5 green bottles hanging on the wall
5 green bottles hanging on the wall
If one green bottle should accidently fall
There would be 4 bottles hanging on the wall
4 green bottles hanging on the wall
4 green bottles hanging on the wall
If one green bottle should accidently fall
There would be 3 bottles hanging on the wall
3 green bottles hanging on the wall
3 green bottles hanging on the wall
If one green bottle should accidently fall
There would be 2 bottles hanging on the wall
2 green bottles hanging on the wall
2 green bottles hanging on the wall
If one green bottle should accidently fall
There would be 1 bottle hanging on the wall
1 green bottle hanging on the wall
1 green bottle hanging on the wall
If one green bottle should accidently fall
There would be 0 bottles hanging on the wall




  • Previous by thread: MIA, Ask an Expert: textbox
  • Next by thread: MIA, Ask an Expert: Converting .mwx files to .exe

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2008