matthew andriani schrieb:

Hi Guys,

I wrote this program for some practice to get into python..I'm trying to find fun ways to learn the language so if anyone has a challenge on this basic level using loops that sounds exciting please let me know.. If you think this program can be improved please let me know too :)

b = "bottles of beer"
w = "on the wall"
a = 100
while a != 0:
    a = a-1
print a,b,w,a,b,"if one of those bottles should happen to fall there'll be",a-1,b,w


If you don't want the output of your program to be considered as a somewhat strange joke, you should better write:

b = "bottles of beer"
w = "on the wall"
a = 100
while a != 0:
print a,b,w,a,b,"if one of those bottles should happen to fall there'll be",a-1,b,w
  a = a-1

That means: determine carefully the order of statements in the body of a loop.

Regards,
Gregor

Thanks for the feedback..

Cheers,
Skellem.



------------------------------------------------------------------------
What can you do with the new Windows Live? Find out <http://www.microsoft.com/windows/windowslive/default.aspx>
------------------------------------------------------------------------

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to