Like in any language there any number for ways, heres another
b = "bottles of beer"
w = "on the wall"
bottles = range(1, 101)
bottles.reverse()
for bottle in bottles:
print " %s %s %s if one of those bottles should happen to fall there'll
be %s %s %s" % (bottle, b,w, bottle-1, b,w)
Vince
2009/6/17 matthew andriani <[email protected]>
> 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
>
>
> 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 - [email protected]
> http://mail.python.org/mailman/listinfo/tutor
>
>
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor