[Tutor] loops
Kent Johnson
kent37 at tds.net
Mon Dec 7 22:04:22 CET 2009
Is there a question here?
Please skip the giant type size.
Kent
On Mon, Dec 7, 2009 at 2:53 PM, Richard Hultgren <hultgren1946 at yahoo.com> wrote:
> a = 0
> b = 1
> count = 0
> max_count = 20
> while count < max_count:
> count = count + 1
> # we need to keep track of a since we change it
> old_a = a # especially here
> old_b = b
> a = old_b
> b = old_a + old_b
> # Notice that the , at the end of a print statement keeps it
> # from switching to a new line
> print old_a,
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
More information about the Tutor
mailing list